mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
fix: always prefer DataBlocks present in FileInfo (#12386)
This commit is contained in:
parent
530b703902
commit
b5ebfd35b4
@ -778,7 +778,10 @@ func (er erasureObjects) purgeObjectDangling(ctx context.Context, bucket, object
|
||||
if m.Erasure.ParityBlocks == 0 {
|
||||
parityBlocks = er.defaultParityCount
|
||||
}
|
||||
dataBlocks := len(storageDisks) - parityBlocks
|
||||
dataBlocks := m.Erasure.DataBlocks
|
||||
if m.Erasure.DataBlocks == 0 {
|
||||
dataBlocks = len(storageDisks) - parityBlocks
|
||||
}
|
||||
writeQuorum := dataBlocks
|
||||
if dataBlocks == parityBlocks {
|
||||
writeQuorum++
|
||||
|
@ -344,7 +344,11 @@ func objectQuorumFromMeta(ctx context.Context, partsMetaData []FileInfo, errs []
|
||||
parityBlocks = defaultParityCount
|
||||
}
|
||||
|
||||
dataBlocks := len(partsMetaData) - parityBlocks
|
||||
dataBlocks := latestFileInfo.Erasure.DataBlocks
|
||||
if dataBlocks == 0 {
|
||||
dataBlocks = len(partsMetaData) - parityBlocks
|
||||
}
|
||||
|
||||
writeQuorum := dataBlocks
|
||||
if dataBlocks == parityBlocks {
|
||||
writeQuorum++
|
||||
|
Loading…
Reference in New Issue
Block a user