zymap commented on code in PR #21035:
URL: https://github.com/apache/pulsar/pull/21035#discussion_r1303700396
##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/bookkeeper/PulsarRegistrationClient.java:
##########
@@ -88,13 +91,29 @@ public PulsarRegistrationClient(MetadataStore store,
.newSingleThreadScheduledExecutor(new
DefaultThreadFactory("pulsar-registration-client"));
store.registerListener(this::updatedBookies);
+ this.store.registerSessionListener(this::refreshBookies);
}
@Override
public void close() {
executor.shutdownNow();
}
+ private void refreshBookies(SessionEvent sessionEvent) {
+ lastMetadataSessionEvent = sessionEvent;
+ if (!SessionEvent.Reconnected.equals(sessionEvent)){
Review Comment:
Do we need to invalidate the cache if the event is `SessionReestablished`?
--
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]