diff --git a/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java b/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java index 8d67ba0a1bb1b..1a5173ced911f 100644 --- a/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java +++ b/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java @@ -498,7 +498,7 @@ protected void receivedSessionEvent(SessionEvent event) { isConnected = event.isConnected(); // Clear cache after session expired. - if (event == SessionEvent.SessionLost) { + if (event == SessionEvent.SessionLost || event == SessionEvent.ConnectionLost) { for (MetadataCacheImpl metadataCache : metadataCaches) { metadataCache.invalidateAll(); }