You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2022/04/12 10:46:59 UTC
[pulsar] 01/03: [fix][broker] Return if reset in progress (#14978)
This is an automated email from the ASF dual-hosted git repository.
penghui pushed a commit to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 4829f79fbaf2940d220e0906091390cfcf0cad36
Author: Xiaoyu Hou <An...@gmail.com>
AuthorDate: Wed Apr 6 20:49:01 2022 +0800
[fix][broker] Return if reset in progress (#14978)
### Motivation
- Fix bug. If cursor reset in progress, the callback method will call `resetFailed` but without return. This will cause the callback be invoked again
### Modifications
- Just add `return` after callback invoke `resetFailed` If cursor reset in progress
(cherry picked from commit 81da8d3cd199fd6c1e4510a1c1c2ac71418efd5e)
---
.../main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
index d03351f2da2..dfd4d6f220a 100644
--- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
+++ b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
@@ -1045,6 +1045,7 @@ public class ManagedCursorImpl implements ManagedCursor {
resetCursorCallback.resetFailed(
new ManagedLedgerException.ConcurrentFindCursorPositionException("reset already in progress"),
position);
+ return;
}
}