diff options
Diffstat (limited to 'weed/storage/erasure_coding/ec_test.go')
| -rw-r--r-- | weed/storage/erasure_coding/ec_test.go | 4 |
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 } |
