mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
Fix quorum calculation with zero parity objects (#19250)
Currently, the code relies on object parity to decide whether it is a delete marker or a regular object. In the case of a delete marker, the return quorum is half of the disks in the erasure set. However, this calculation must be corrected with objects with EC = 0, mainly because EC is not a one-time fixed configuration. Though all data are correct, the manifested symptom is a 503 with an EC=0 object. This bug was manifested after we introduced the fast Get Object feature that does not read all data from all disks in case of inlined objects
This commit is contained in:
parent
81d7531f1f
commit
24b4f9d748
@ -502,14 +502,6 @@ func objectQuorumFromMeta(ctx context.Context, partsMetaData []FileInfo, errs []
|
||||
return -1, -1, errErasureReadQuorum
|
||||
}
|
||||
|
||||
if parityBlocks == 0 {
|
||||
// For delete markers do not use 'defaultParityCount' as it is not expected to be the case.
|
||||
// Use maximum allowed read quorum instead, writeQuorum+1 is returned for compatibility sake
|
||||
// but there are no callers that shall be using this.
|
||||
readQuorum := len(partsMetaData) / 2
|
||||
return readQuorum, readQuorum + 1, nil
|
||||
}
|
||||
|
||||
dataBlocks := len(partsMetaData) - parityBlocks
|
||||
|
||||
writeQuorum := dataBlocks
|
||||
|
Loading…
Reference in New Issue
Block a user