Implement full scrubbing for EC volumes (#8318)

Implement full scrubbing for EC volumes.
This commit is contained in:
Lisandro Pin
2026-02-17 00:09:01 +01:00
committed by GitHub
parent 564fc56698
commit a9d12a0792
4 changed files with 160 additions and 32 deletions

View File

@@ -43,6 +43,23 @@ func AllShardIds() []ShardId {
return res
}
// Compares a pair of EcShardInfo protos for sorting.
func CmpEcShardInfo(a, b *volume_server_pb.EcShardInfo) int {
if a.VolumeId < b.VolumeId {
return -1
}
if a.VolumeId > b.VolumeId {
return 1
}
if a.ShardId < b.ShardId {
return -1
}
if a.ShardId > b.ShardId {
return 1
}
return 0
}
type EcVolumeShard struct {
VolumeId needle.VolumeId
ShardId ShardId