mattisonchao commented on code in PR #19844:
URL: https://github.com/apache/pulsar/pull/19844#discussion_r1139221215
##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/coordination/impl/ResourceLockImpl.java:
##########
@@ -74,22 +74,16 @@ public synchronized T getValue() {
public synchronized CompletableFuture<Void> updateValue(T newValue) {
// If there is an operation in progress, we're going to let it
complete before attempting to
// update the value
- if (pendingOperationFuture.isDone()) {
- pendingOperationFuture = CompletableFuture.completedFuture(null);
- }
-
- pendingOperationFuture = pendingOperationFuture.thenCompose(v -> {
- synchronized (ResourceLockImpl.this) {
- if (state != State.Valid) {
- return CompletableFuture.failedFuture(
- new IllegalStateException("Lock was not in valid
state: " + state));
- }
-
- return acquire(newValue);
- }
- });
-
- return pendingOperationFuture;
+ return pendingOperationFuture =
pendingOperationFuture.exceptionally(ex -> null) // ignore all the exception
Review Comment:
@merlimat I have reverted this part of the code you mentioned. PTAL.
--
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]