You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/27 13:06:53 UTC

[GitHub] [pulsar] mattisonchao commented on a diff in pull request #17758: [fix][metadata] Fix allow updating the released resource lock value.

mattisonchao commented on code in PR #17758:
URL: https://github.com/apache/pulsar/pull/17758#discussion_r981216974


##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/coordination/impl/ResourceLockImpl.java:
##########
@@ -71,7 +73,14 @@ public synchronized T getValue() {
 
     @Override
     public synchronized CompletableFuture<Void> updateValue(T newValue) {
-       return acquire(newValue);
+        if (state == State.Revalidating) {
+            return revalidateFuture
+                    // ignore revalidate result
+                    .exceptionally(ignore -> null)
+                    .thenCompose(__ -> acquire(newValue));

Review Comment:
   I can try on it.



-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org