Skip to content

Commit

Permalink
[fix] fix Auditor ignoring bookies shut down before Auditor start (#4419
Browse files Browse the repository at this point in the history
)

(cherry picked from commit 896137d)
  • Loading branch information
dlg99 authored and lhotari committed Jun 13, 2024
1 parent 7efcbd2 commit 2923cac
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.BiConsumer;
import java.util.stream.Collectors;
import org.apache.bookkeeper.client.BKException;
import org.apache.bookkeeper.client.BookKeeper;
import org.apache.bookkeeper.client.BookKeeperAdmin;
Expand Down Expand Up @@ -386,7 +387,12 @@ public void start() {

try {
watchBookieChanges();
knownBookies = getAvailableBookies();
// Start with all available bookies
// to handle situations where the auditor
// is started after some bookies have already failed
knownBookies = admin.getAllBookies().stream()
.map(BookieId::toString)
.collect(Collectors.toList());
this.ledgerUnderreplicationManager
.notifyLostBookieRecoveryDelayChanged(new LostBookieRecoveryDelayChangedCb());
} catch (BKException bke) {
Expand Down

0 comments on commit 2923cac

Please sign in to comment.