with xlv2 format we never had to fill in checksumInfo() (#17963)

- this PR avoids sending a large ChecksumInfo slice
  when its not needed

- also for a file with XLV2 format there is no reason
  to allocate Checksum slice while reading
This commit is contained in:
Harshavardhana
2023-09-01 13:45:58 -07:00
committed by GitHub
parent 6a8d8f34a5
commit 18b3655c99
5 changed files with 5 additions and 39 deletions

View File

@@ -620,7 +620,7 @@ func TestDisksWithAllParts(t *testing.T) {
diskFailures[15] = "part.1"
for diskIndex, partName := range diskFailures {
for i := range partsMetadata[diskIndex].Erasure.Checksums {
for i := range partsMetadata[diskIndex].Parts {
if fmt.Sprintf("part.%d", i+1) == partName {
filePath := pathJoin(erasureDisks[diskIndex].String(), bucket, object, partsMetadata[diskIndex].DataDir, partName)
f, err := os.OpenFile(filePath, os.O_WRONLY|os.O_SYNC, 0)