bugfix for RackawareEnsemblePlacementPolicyImpl.isEnsembleAdheringToPlacementPolicy
Descriptions of the changes in this PR:
Motivation
bugfix: when enforceMinNumRacksPerWriteQuorum is false, no need to check racks in quorum when all bookies is in a rack,when the old bookie node is offline for machine is broken,the ReplicationWorker want call method BookKeeperAdmin.getReplacementBookiesByIndexes, but find minNumRacksPerWriteQuorum(default value is 2) is large than racksInQuorum,but enforceMinNumRacksPerWriteQuorum(default value is false) is not open for checking this rack.
So I think we should charge enforceMinNumRacksPerWriteQuorum is closed,no need to check rack's information
case :
- minNumRacksPerWriteQuorum(default value is 2)
- enforceMinNumRacksPerWriteQuorum(default value is false)
- no rack config(just use default-rack) isEnsembleAdheringToPlacementPolicy will return false, then it will be unexpected
Changes
bugfix: when enforceMinNumRacksPerWriteQuorum is false, no need to check racks in quorum
@eolivelli @pkumar-singh @zymap If you have time, please help me review it, thank you
https://github.com/apache/bookkeeper/pull/1941/files#r258714042 Here has a discussion about this issue.
https://github.com/apache/bookkeeper/pull/1941/files#r258714042 Here has a discussion about this issue.
case :
- minNumRacksPerWriteQuorum(default value is 2)
- enforceMinNumRacksPerWriteQuorum(default value is false)
- no rack config(just use default-rack) isEnsembleAdheringToPlacementPolicy will return false, then it will be unexpected @jvrao @reddycharan @zymap