You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2023/07/04 08:44:06 UTC

[pulsar] branch branch-2.10 updated: [fix][broker] Invalidate metadata children cache after key deleted (#20363)

This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-2.10 by this push:
     new 64831dc9c65 [fix][broker] Invalidate metadata children cache after key deleted (#20363)
64831dc9c65 is described below

commit 64831dc9c65fdcd909a0809bc3edaaf556185a3b
Author: 萧易客 <km...@live.com>
AuthorDate: Wed May 24 21:56:30 2023 +0800

    [fix][broker] Invalidate metadata children cache after key deleted (#20363)
---
 .../java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java     | 2 ++
 1 file changed, 2 insertions(+)

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 db9b05a8b14..521b8bea546 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
@@ -206,6 +206,7 @@ public abstract class AbstractMetadataStore implements MetadataStoreExtended, Co
 
         if (type == NotificationType.Created || type == NotificationType.Deleted) {
             existsCache.synchronous().invalidate(path);
+            childrenCache.synchronous().invalidate(path);
             String parent = parent(path);
             if (parent != null) {
                 childrenCache.synchronous().invalidate(parent);
@@ -232,6 +233,7 @@ public abstract class AbstractMetadataStore implements MetadataStoreExtended, Co
         return storeDelete(path, expectedVersion)
                 .thenRun(() -> {
                     existsCache.synchronous().invalidate(path);
+                    childrenCache.synchronous().invalidate(path);
                     String parent = parent(path);
                     if (parent != null) {
                         childrenCache.synchronous().invalidate(parent);