mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 19:10:03 +08:00
only copy required shards
This commit is contained in:
@@ -104,3 +104,10 @@ func (b ShardBits) Minus(other ShardBits) ShardBits {
|
||||
func (b ShardBits) Plus(other ShardBits) ShardBits {
|
||||
return b | other
|
||||
}
|
||||
|
||||
func (b ShardBits) MinusParityShards() ShardBits {
|
||||
for i := DataShardsCount; i < TotalShardsCount; i++ {
|
||||
b = b.RemoveShardId(ShardId(i))
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
Reference in New Issue
Block a user