Fix inconsistently written compressed files. (#20846)

Before https://github.com/minio/minio/pull/20575, files could pick up indices 
from unrelated files if no index was added.

This would result in these files not being consistent across a set.

When loading, search for the compression indicators and check if they 
are within the problematic date range, and clean up any parts that have 
an index but shouldn't.

The test validates that the signature matches the one in files stored without an index.

Bumps xlMetaVersion, so this check doesn't have to be made for future versions.
This commit is contained in:
Klaus Post
2025-01-17 11:17:18 -08:00
committed by GitHub
parent b4ac53d157
commit b9196757fd
3 changed files with 70 additions and 3 deletions

View File

@@ -664,7 +664,7 @@ func (x xlMetaInlineData) files(fn func(name string, data []byte)) error {
const (
xlHeaderVersion = 3
xlMetaVersion = 2
xlMetaVersion = 3
)
type xlHeaders struct {