mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-26 23:10:44 +01:00
ensure uniqness
This commit is contained in:
1 parent
530036df27
commit
602ce24a15
1 file changed
+1
-1
@@ -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