heesung-sn commented on code in PR #23902:
URL: https://github.com/apache/pulsar/pull/23902#discussion_r1931417846
##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/coordination/impl/ResourceLockImpl.java:
##########
@@ -188,6 +188,17 @@ private CompletableFuture<Void>
acquireWithNoRevalidation(T newValue) {
CompletableFuture<Void> result = new CompletableFuture<>();
store.put(path, payload, Optional.of(version),
EnumSet.of(CreateOption.Ephemeral))
.thenAccept(stat -> {
+ if (!stat.isEphemeral()) {
Review Comment:
I hit this error from
`testLookupConnectionNotCloseIfFailedToAcquireOwnershipOfBundle`, where the
lock suddenly became persistent, after invalidating the cache and updating it
with null.
This is a bit surprising to me that the ephemeral lock can suddenly become
persistent(afaik, this is from the zk server behavior, not from zk client). I
couldn't find enough zk doc/references to explain this behavior.
```java
cache.invalidateLocalOwnerCache();
final var lock =
pulsar.getCoordinationService().getLockManager(NamespaceEphemeralData.class)
.acquireLock(ServiceUnitUtils.path(bundle), new
NamespaceEphemeralData()).join();
lock.updateValue(null);
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]