From 04be352ae908cb10f54c2c43181d72c762c8ee7b Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Mon, 12 Aug 2024 12:02:21 -0700 Subject: [PATCH] Relax quorum agreement on DataDir values (#20232) Previously, we checked if we had a quorum on the DataDir value. We are removing this check, which allows reading objects with different DataDir values in a few drives (due to a rebalance-stop race bug) provided their eTags or ModTimes match. --- cmd/erasure-metadata.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/erasure-metadata.go b/cmd/erasure-metadata.go index 7a43c8bef..dca6636a3 100644 --- a/cmd/erasure-metadata.go +++ b/cmd/erasure-metadata.go @@ -289,13 +289,14 @@ func findFileInfoInQuorum(ctx context.Context, metaArr []FileInfo, modTime time. mtimeValid := meta.ModTime.Equal(modTime) if mtimeValid || etagOnly { fmt.Fprintf(h, "%v", meta.XLV1) - if !etagOnly { - // Verify dataDir is same only when mtime is valid and etag is not considered. - fmt.Fprintf(h, "%v", meta.GetDataDir()) - } for _, part := range meta.Parts { fmt.Fprintf(h, "part.%d", part.Number) + fmt.Fprintf(h, "part.%d", part.Size) } + // Previously we checked if we had quorum on DataDir value. + // We have removed this check to allow reading objects with different DataDir + // values in a few drives (due to a rebalance-stop race bug) + // provided their their etags or ModTimes match. if !meta.Deleted && meta.Size != 0 { fmt.Fprintf(h, "%v+%v", meta.Erasure.DataBlocks, meta.Erasure.ParityBlocks)