You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by yo...@apache.org on 2023/06/19 07:42:45 UTC
[bookkeeper] 21/31: When the executor has been shut down, do not schedule task (#3946)
This is an automated email from the ASF dual-hosted git repository.
yong pushed a commit to branch branch-4.16
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
commit 6cbccfd8b88907602f2ef1bf2a7e908115fc5168
Author: wenbingshen <ol...@gmail.com>
AuthorDate: Wed May 10 10:34:01 2023 +0800
When the executor has been shut down, do not schedule task (#3946)
(cherry picked from commit 1fead36861a62fa052330edc5b3026ce3626f6b1)
---
.../org/apache/bookkeeper/replication/Auditor.java | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
index 739a5ff7d7..ceac7c56f8 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
@@ -391,27 +391,18 @@ public class Auditor implements AutoCloseable {
try {
watchBookieChanges();
knownBookies = getAvailableBookies();
- } catch (BKException bke) {
- LOG.error("Couldn't get bookie list, so exiting", bke);
- submitShutdownTask();
- }
-
- try {
this.ledgerUnderreplicationManager
.notifyLostBookieRecoveryDelayChanged(new LostBookieRecoveryDelayChangedCb());
- } catch (UnavailableException ue) {
- LOG.error("Exception while registering for LostBookieRecoveryDelay change notification, so exiting",
- ue);
- submitShutdownTask();
- }
-
- try {
this.ledgerUnderreplicationManager.notifyUnderReplicationLedgerChanged(
new UnderReplicatedLedgersChangedCb());
+ } catch (BKException bke) {
+ LOG.error("Couldn't get bookie list, so exiting", bke);
+ submitShutdownTask();
+ return;
} catch (UnavailableException ue) {
- LOG.error("Exception while registering for under-replicated ledgers change notification, so exiting",
- ue);
+ LOG.error("Exception while registering for change notification, so exiting", ue);
submitShutdownTask();
+ return;
}
scheduleBookieCheckTask();