Technoboy- commented on code in PR #19045:
URL: https://github.com/apache/pulsar/pull/19045#discussion_r1089589647
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java:
##########
@@ -619,14 +618,13 @@ private void doCleanup(String broker) {
|| StringUtils.equals(broker, stateData.sourceBroker())) {
log.info("Cleaning ownership serviceUnit:{}, stateData:{}.",
serviceUnit, stateData);
tombstoneAsync(serviceUnit).whenComplete((__, e) -> {
- if (e == null) {
- serviceUnitTombstoneCnt.incrementAndGet();
- } else {
+ if (e != null) {
log.error("Failed cleaning the ownership
serviceUnit:{}, stateData:{}.",
serviceUnit, stateData);
serviceUnitTombstoneErrorCnt.incrementAndGet();
}
});
+ serviceUnitTombstoneCnt.incrementAndGet();
Review Comment:
Could you help explain why do we need modify here ?
we update `serviceUnitTombstoneErrorCnt` and `serviceUnitTombstoneCnt` in
the async method. these values could both be 0.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]