mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Make isIndexedMetaV2 return errors (#15012)
Indexed streams would be decoded by the legacy loader if there was an error loading it. Return an error when the stream is indexed and it cannot be loaded. Fixes "unknown minor metadata version" on corrupted xl.meta files and returns an actual error.
This commit is contained in:
@@ -514,7 +514,7 @@ func BenchmarkXlMetaV2Shallow(b *testing.B) {
|
||||
b.ResetTimer()
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
buf, _ := isIndexedMetaV2(enc)
|
||||
buf, _, _ := isIndexedMetaV2(enc)
|
||||
if buf == nil {
|
||||
b.Fatal("buf == nil")
|
||||
}
|
||||
@@ -529,7 +529,7 @@ func BenchmarkXlMetaV2Shallow(b *testing.B) {
|
||||
b.ResetTimer()
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
buf, _ := isIndexedMetaV2(enc)
|
||||
buf, _, _ := isIndexedMetaV2(enc)
|
||||
if buf == nil {
|
||||
b.Fatal("buf == nil")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user