You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by zi...@apache.org on 2022/04/06 12:49:12 UTC
[pulsar] branch master updated: [fix][broker] Return if reset in progress (#14978)
This is an automated email from the ASF dual-hosted git repository.
zike pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 81da8d3cd19 [fix][broker] Return if reset in progress (#14978)
81da8d3cd19 is described below
commit 81da8d3cd199fd6c1e4510a1c1c2ac71418efd5e
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
---
.../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 a5cabe2cde3..8d1dda19e5f 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
@@ -1048,6 +1048,7 @@ public class ManagedCursorImpl implements ManagedCursor {
resetCursorCallback.resetFailed(
new ManagedLedgerException.ConcurrentFindCursorPositionException("reset already in progress"),
position);
+ return;
}
}