Demogorgon314 commented on code in PR #19546:
URL: https://github.com/apache/pulsar/pull/19546#discussion_r1112774848
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java:
##########
@@ -522,12 +590,22 @@ private void handleAssignEvent(String serviceUnit,
ServiceUnitStateData data) {
}
private void handleReleaseEvent(String serviceUnit, ServiceUnitStateData
data) {
- if (isTargetBroker(data.sourceBroker())) {
- ServiceUnitStateData next = new ServiceUnitStateData(Owned,
data.broker(), data.sourceBroker());
- // TODO: when close, pass message to clients to connect to the new
broker
- closeServiceUnit(serviceUnit)
- .thenCompose(__ -> pubAsync(serviceUnit, next))
- .whenComplete((__, e) -> log(e, serviceUnit, data, next));
+
+ if (isTransferCommand(data)) {
+ if (isTargetBroker(data.sourceBroker())) {
Review Comment:
Should we use `data.sourceBroker()` in `handleAssignEvent ` method, when it
is a transfer command?
--
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]