You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by lu...@apache.org on 2023/05/10 02:34:09 UTC

[bookkeeper] branch master updated: When the executor has been shut down, do not schedule task (#3946)

This is an automated email from the ASF dual-hosted git repository.

lushiji pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 1fead36861 When the executor has been shut down, do not schedule task (#3946)
1fead36861 is described below

commit 1fead36861a62fa052330edc5b3026ce3626f6b1
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)
---
 .../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();