mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-15 20:06:19 +08:00
Revert "Revert "Merge branch 'master' of https://github.com/seaweedfs/seaweedfs""
This reverts commit 8cb42c39
This commit is contained in:
@@ -84,8 +84,11 @@ func (ev *EcVolume) AddEcVolumeShard(ecVolumeShard *EcVolumeShard) bool {
|
||||
}
|
||||
}
|
||||
ev.Shards = append(ev.Shards, ecVolumeShard)
|
||||
slices.SortFunc(ev.Shards, func(a, b *EcVolumeShard) bool {
|
||||
return a.VolumeId < b.VolumeId || a.VolumeId == b.VolumeId && a.ShardId < b.ShardId
|
||||
slices.SortFunc(ev.Shards, func(a, b *EcVolumeShard) int {
|
||||
if a.VolumeId != b.VolumeId {
|
||||
return int(a.VolumeId - b.VolumeId)
|
||||
}
|
||||
return int(a.ShardId - b.ShardId)
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
Reference in New Issue
Block a user