Girish Sharma
03/21/2024, 1:51 PMenforceMinNumRacksPerWriteQuorum flag correctly on the bookie client.
But now its putting all our available bookies into exclude bookies even though there are enough bookies per rack..
The issue which is coming is that RackawareEnsemblePlacementPolicyImpl::addDefaultRackBookiesIfMinNumRacksIsEnforced seems to be adding all the bookies.. it might be due to the call topology.getLeaves(getDefaultRack()) inside that method (Referencing bookie client 4.14.8) because that's the only way it will run the following for loop and then reach the
<http://LOG.info|LOG.info>("enforceMinNumRacksPerWriteQuorum is enabled, so Excluding bookies of defaultRack: {}",
bookiesInDefaultRack);
line which we see in logs. We have not set any bookie's rack as the default rack - /default-rack ... So not sure why topology.getLeaves(getDefaultRack()) is returning non empty list.. Any pointers here?Girish Sharma
03/21/2024, 1:52 PMGirish Sharma
03/21/2024, 2:09 PMGirish Sharma
03/21/2024, 2:45 PMLOG.error("Only one rack available and minNumRacksPerWriteQuorum is enforced, so giving up");
.. so the topology thinks that we have only one rack.. .. while when we do pulsar-admin bookies racks-placement gives correct result with 3 groups and multiple bookies under each group with more than 3 unique racks overall per groupGirish Sharma
03/21/2024, 2:46 PM{
"prod:_shared_": {
"prod-pulsar-bookie-13.prod-pulsar-bookie.prod.svc.cluster.local:3181": {
"rack": "3"
},
"prod-pulsar-bookie-12.prod-pulsar-bookie.prod.svc.cluster.local:3181": {
"rack": "2"
},
"prod-pulsar-bookie-10.prod-pulsar-bookie.prod.svc.cluster.local:3181": {
"rack": "3"
},
"prod-pulsar-bookie-9.prod-pulsar-bookie.prod.svc.cluster.local:3181": {
"rack": "3"
},
"prod-pulsar-bookie-8.prod-pulsar-bookie.prod.svc.cluster.local:3181": {
"rack": "1"
},
...Lari Hotari
03/21/2024, 3:44 PMLari Hotari
03/21/2024, 3:46 PMLari Hotari
03/21/2024, 3:46 PMLari Hotari
03/21/2024, 3:48 PMLari Hotari
03/21/2024, 3:48 PMLari Hotari
03/21/2024, 3:49 PMLari Hotari
03/21/2024, 3:54 PMbookkeeperClientRegionawarePolicyEnabled=true in the broker.conf
in https://github.com/apache/pulsar/issues/20918 . something to try
well other comment is "no need for this"Girish Sharma
03/21/2024, 4:36 PMGirish Sharma
03/21/2024, 4:55 PMGirish Sharma
03/21/2024, 5:14 PMGirish Sharma
03/21/2024, 5:15 PMupdateRacksWithHost(racksWithHost);
watchAvailableBookies();
after the for loop is doing there..