keith-turner commented on code in PR #5813:
URL: https://github.com/apache/accumulo/pull/5813#discussion_r2293987349
##########
core/src/main/java/org/apache/accumulo/core/fate/FateExecutor.java:
##########
@@ -205,14 +205,14 @@ protected Set<Fate.FateOperation> getFateOps() {
* Initiates the shutdown of this FateExecutor. This means the pool
executing TransactionRunners
* will no longer accept new TransactionRunners, the currently running
TransactionRunners will
* terminate after they are done with their current transaction, if
applicable, and the work
- * finder is interrupted. {@link #isShutdown()} returns true after this is
called.
+ * finder is shutdown. {@link #isShutdown()} returns true after this is
called.
*/
protected void initiateShutdown() {
transactionExecutor.shutdown();
synchronized (runningTxRunners) {
runningTxRunners.forEach(TransactionRunner::flagStop);
}
- workFinder.interrupt();
Review Comment:
Interrupting threads can be useful for the case when they are stuck on IO
and not checking the boolean. Was this interrupt causing a problem? It does
seem inconsistent, we at not interrupting other threads, so removing the
interrupt makes it consistent.
##########
core/src/main/java/org/apache/accumulo/core/fate/FateExecutor.java:
##########
@@ -306,18 +306,19 @@ public void run() {
}
});
} catch (Exception e) {
- if (!fate.getKeepRunning().get() || isShutdown()) {
- log.debug("Expected failure while attempting to find work for
fate: either fate is "
- + "being shutdown and therefore all fate threads are being
shutdown or the "
- + "fate threads assigned to work on {} were invalidated by
config changes "
- + "and are being shutdown", fateOps, e);
- } else {
- log.warn("Unexpected failure while attempting to find work for
fate", e);
- }
-
+ log.warn("Unexpected failure while attempting to find work for
fate", e);
workQueue.clear();
}
}
+
+ if (!fate.getKeepRunning().get() || isShutdown()) {
Review Comment:
Maybe this if is not needed. Seems like these should always be true the way
the code is structured. Was wondering if there should be else for this if,
looking at the code not sure what the else should be.
--
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]