shard id starts from zero

This commit is contained in:
Chris Lu
2019-05-24 11:52:23 -07:00
parent 24b8ad9a14
commit 228850d588
5 changed files with 89 additions and 1 deletions

View File

@@ -1,6 +1,8 @@
package erasure_coding
import (
"fmt"
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
"github.com/chrislusf/seaweedfs/weed/storage/needle"
)
@@ -61,3 +63,7 @@ func (ecInfo *EcVolumeInfo) ToVolumeEcShardInformationMessage() (ret []*master_p
}
return
}
func (ecInfo *EcVolumeInfo) String() string {
return fmt.Sprintf("id:%d shard:%v collection:%v", ecInfo.VolumeId, ecInfo.ShardIds(), ecInfo.Collection)
}