wenbingshen commented on PR #3818:
URL: https://github.com/apache/bookkeeper/pull/3818#issuecomment-1469873636
> LGTM. The feature works when there is only one bookie shutdown, if there
are two bookies or more shutdown at the same, the feature won't work. Maybe we
can add a test for two bookies shutdown cases.
@horizonzy @hangc0276 Auditor has a single-threaded thread pool, and the
auditBookie task triggered by the listening event and the detection task
triggered by the timing task are executed strictly serially.
Therefore, a single bookie failure will delayed auditBookie tasks. At this
point, other detection tasks may continue to execute. This PR can avoid this
situation. But when lostBookieRecoveryDelay=0 or more than 2 bookies fail, the
executor will only be used to process auditBookie, unable to perform other
detection tasks.
So we don't need to worry about more than 2 bookie failure scenarios,
because this is determined by SingleThreadScheduledExecutor.
```java
executor = Executors.newSingleThreadScheduledExecutor(new
ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r, "AuditorBookie-" +
bookieIdentifier);
t.setDaemon(true);
return t;
}
});
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]