merlimat commented on a change in pull request #10391:
URL: https://github.com/apache/pulsar/pull/10391#discussion_r623330451
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java
##########
@@ -115,15 +113,16 @@
// Path to ZNode containing TimeAverageBrokerData jsons for each broker.
public static final String TIME_AVERAGE_BROKER_ZPATH =
"/loadbalance/broker-time-average";
- // ZooKeeper Cache of the currently available active brokers.
- // availableActiveBrokers.get() will return a set of the broker names
without an http prefix.
- private ZooKeeperChildrenCache availableActiveBrokers;
-
// Set of broker candidates to reuse so that object creation is avoided.
private final Set<String> brokerCandidateCache;
- // ZooKeeper cache of the local broker data, stored in
LoadManager.LOADBALANCE_BROKER_ROOT.
- private ZooKeeperDataCache<LocalBrokerData> brokerDataCache;
+ // Cache of the local broker data, stored in
LoadManager.LOADBALANCE_BROKER_ROOT.
+ private LockManager<LocalBrokerData> brokersData;
Review comment:
It is a lock though, in the sense that we're acquiring an ephemeral
z-node with the broker name. If there's already a z-node there we need to
handle the scenario and that's what the ResourceLock does
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]