mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-08-19 05:36:58 +00:00
ensure uniqness
This commit is contained in:
@@ -42,7 +42,7 @@ func (cr *CapacityReservations) addReservation(diskType types.DiskType, count in
|
||||
cr.Lock()
|
||||
defer cr.Unlock()
|
||||
|
||||
reservationId := fmt.Sprintf("%s-%d-%d", diskType, count, time.Now().UnixNano())
|
||||
reservationId := fmt.Sprintf("%s-%d-%d-%d", diskType, count, time.Now().UnixNano(), rand.Int64())
|
||||
cr.reservations[reservationId] = &CapacityReservation{
|
||||
reservationId: reservationId,
|
||||
diskType: diskType,
|
||||
|
||||
Reference in New Issue
Block a user