avoid Access() calls on known bucket paths (#17719)

This commit is contained in:
Harshavardhana
2023-07-26 11:31:40 -07:00
committed by GitHub
parent a7c71e4c6b
commit b28bcad11b
3 changed files with 85 additions and 70 deletions

View File

@@ -1065,8 +1065,8 @@ func TestHealObjectCorruptedPools(t *testing.T) {
}
for i := 0; i < (nfi.Erasure.DataBlocks + nfi.Erasure.ParityBlocks); i++ {
_, err = erasureDisks[i].StatInfoFile(context.Background(), bucket, pathJoin(object, xlStorageFormatFile), false)
if err == nil {
stats, _ := erasureDisks[i].StatInfoFile(context.Background(), bucket, pathJoin(object, xlStorageFormatFile), false)
if len(stats) != 0 {
t.Errorf("Expected xl.meta file to be not present, but succeeeded")
}
}