This is an automated email from the ASF dual-hosted git repository.
technoboy pushed a commit to branch branch-2.11
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.11 by this push:
new d79358a4942 [fix][broker] Invalidate metadata children cache after key
deleted (#20363)
d79358a4942 is described below
commit d79358a49429677904fc2770d6d2627b66421045
Author: 萧易客 <[email protected]>
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 f74c624a10d..10400d19e47 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
@@ -295,6 +295,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);
@@ -332,6 +333,7 @@ public abstract class AbstractMetadataStore implements
MetadataStoreExtended, Co
// Ensure caches are invalidated before the operation is confirmed
return storeDelete(path, expectedVersion).thenRun(() -> {
existsCache.synchronous().invalidate(path);
+ childrenCache.synchronous().invalidate(path);
String parent = parent(path);
if (parent != null) {
childrenCache.synchronous().invalidate(parent);