working with reading remote intervals

This commit is contained in:
Chris Lu
2019-05-28 21:29:07 -07:00
parent 302d9fbc6d
commit 3f9ecee40f
15 changed files with 76 additions and 63 deletions

View File

@@ -40,7 +40,7 @@ func (ecInfo *EcVolumeInfo) ShardIdCount() (count int) {
return ecInfo.ShardBits.ShardIdCount()
}
func (ecInfo *EcVolumeInfo) Minus(other *EcVolumeInfo) (*EcVolumeInfo) {
func (ecInfo *EcVolumeInfo) Minus(other *EcVolumeInfo) *EcVolumeInfo {
ret := &EcVolumeInfo{
VolumeId: ecInfo.VolumeId,
Collection: ecInfo.Collection,
@@ -88,10 +88,10 @@ func (b ShardBits) ShardIdCount() (count int) {
return
}
func (b ShardBits) Minus(other ShardBits) (ShardBits) {
func (b ShardBits) Minus(other ShardBits) ShardBits {
return b &^ other
}
func (b ShardBits) Plus(other ShardBits) (ShardBits) {
func (b ShardBits) Plus(other ShardBits) ShardBits {
return b | other
}