mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 20:20:25 +03:00
fix: choose appropriate quorum for a given erasure set (#13998)
multiObject delete should honor expected quorum
This commit is contained in:
@@ -84,6 +84,19 @@ func (er erasureObjects) Shutdown(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// defaultWQuorum write quorum based on setDriveCount and defaultParityCount
|
||||
func (er erasureObjects) defaultWQuorum() int {
|
||||
dataCount := er.setDriveCount - er.defaultParityCount
|
||||
if dataCount == er.defaultParityCount {
|
||||
return dataCount + 1
|
||||
}
|
||||
return dataCount
|
||||
}
|
||||
|
||||
func (er erasureObjects) defaultRQuorum() int {
|
||||
return er.setDriveCount - er.defaultParityCount
|
||||
}
|
||||
|
||||
// byDiskTotal is a collection satisfying sort.Interface.
|
||||
type byDiskTotal []madmin.Disk
|
||||
|
||||
|
||||
Reference in New Issue
Block a user