bookkeeper icon indicating copy to clipboard operation
bookkeeper copied to clipboard

bugfix for RackawareEnsemblePlacementPolicyImpl.isEnsembleAdheringToPlacementPolicy

Open StevenLuMT opened this issue 4 years ago • 3 comments

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

image image

case :

  1. minNumRacksPerWriteQuorum(default value is 2)
  2. enforceMinNumRacksPerWriteQuorum(default value is false)
  3. 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

StevenLuMT avatar Dec 23 '21 09:12 StevenLuMT

@eolivelli @pkumar-singh @zymap If you have time, please help me review it, thank you

StevenLuMT avatar Jan 16 '22 01:01 StevenLuMT

https://github.com/apache/bookkeeper/pull/1941/files#r258714042 Here has a discussion about this issue.

zymap avatar Jan 17 '22 01:01 zymap

https://github.com/apache/bookkeeper/pull/1941/files#r258714042 Here has a discussion about this issue.

case :

  1. minNumRacksPerWriteQuorum(default value is 2)
  2. enforceMinNumRacksPerWriteQuorum(default value is false)
  3. no rack config(just use default-rack) isEnsembleAdheringToPlacementPolicy will return false, then it will be unexpected @jvrao @reddycharan @zymap

StevenLuMT avatar Jan 17 '22 02:01 StevenLuMT