poorbarcode commented on code in PR #23018:
URL: https://github.com/apache/pulsar/pull/23018#discussion_r1694688117


##########
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.
+        if (event == SessionEvent.SessionLost || event == 
SessionEvent.ConnectionLost) {
+            for (MetadataCacheImpl metadataCache : metadataCaches) {
+                metadataCache.invalidateAll();
+            }
+            childrenCache.synchronous().invalidateAll();
+            existsCache.synchronous().invalidateAll();

Review Comment:
   Fixed



-- 
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

Reply via email to