poorbarcode commented on code in PR #23018: URL: https://github.com/apache/pulsar/pull/23018#discussion_r1672233998
########## pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java: ########## @@ -496,6 +496,17 @@ public void registerSessionListener(Consumer<SessionEvent> listener) { protected void receivedSessionEvent(SessionEvent event) { isConnected = event.isConnected(); + + // Clear cache after session expired. Review Comment: @merlimat 1. Session expires 2. ZK nodes updated a. **(Highlight)**: notifications will be lost and makes the cache dirty. 3. Session re-established Even though the session is re-established, it may lose some notifications, so clearing the cache is better. ########## pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java: ########## @@ -496,6 +496,17 @@ public void registerSessionListener(Consumer<SessionEvent> listener) { protected void receivedSessionEvent(SessionEvent event) { isConnected = event.isConnected(); + + // Clear cache after session expired. Review Comment: @merlimat 1. Session expires 2. ZK nodes were updated a. **(Highlight)**: notifications will be lost and makes the cache dirty. 3. Session re-established Even though the session is re-established, it may lose some notifications, so clearing the cache is better. -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org