mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-13 15:29:12 +01:00
only copy required shards
This commit is contained in:
1 parent
c7d5a0b00c
commit
a18f62bbe7
2 files changed
+8
-1
No files matched your search
@@ -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