aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/erasure_coding/ec_test.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-05-25 02:02:44 -0700
committerChris Lu <chris.lu@gmail.com>2019-05-25 02:02:44 -0700
commitf0e6574d5ed03446b9b221653b20618c0e11b381 (patch)
treed54d1ce0fd6254ee9dc0a3b050e336d74a68885e /weed/storage/erasure_coding/ec_test.go
parent6f4b09b6a46f63eaebbbc23198d3ec73754ed11d (diff)
downloadseaweedfs-f0e6574d5ed03446b9b221653b20618c0e11b381.tar.xz
seaweedfs-f0e6574d5ed03446b9b221653b20618c0e11b381.zip
allocate ec shards to volume servers
Diffstat (limited to 'weed/storage/erasure_coding/ec_test.go')
-rw-r--r--weed/storage/erasure_coding/ec_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/storage/erasure_coding/ec_test.go b/weed/storage/erasure_coding/ec_test.go
index 625f4e9a6..ecf73ac96 100644
--- a/weed/storage/erasure_coding/ec_test.go
+++ b/weed/storage/erasure_coding/ec_test.go
@@ -153,9 +153,9 @@ func readFromOtherEcFiles(ecFiles []*os.File, ecFileIndex int, ecFileOffset int6
return nil, fmt.Errorf("failed to create encoder: %v", err)
}
- bufs := make([][]byte, DataShardsCount+ParityShardsCount)
+ bufs := make([][]byte, TotalShardsCount)
for i := 0; i < DataShardsCount; {
- n := int(rand.Int31n(DataShardsCount + ParityShardsCount))
+ n := int(rand.Int31n(TotalShardsCount))
if n == ecFileIndex || bufs[n] != nil {
continue
}