keith-turner commented on code in PR #5263:
URL: https://github.com/apache/accumulo/pull/5263#discussion_r1917453007


##########
core/src/main/java/org/apache/accumulo/core/fate/Fate.java:
##########
@@ -179,9 +187,25 @@ public void run() {
   }
 
   private class TransactionRunner implements Runnable {
+    private final AtomicReference<RunnerState> runnerState =
+        new AtomicReference<>(new RunnerState(false, false));
+
+    private class RunnerState {
+      // used to signal a TransactionRunner to stop in the case where there 
are too many running
+      // i.e., the property for the pool size decreased and we have excess 
TransactionRunners
+      private final boolean stop;
+      // whether the TransactionRunner is executing the run() method (may or 
may not be working on
+      // a tx, could be waiting for a tx)
+      private final boolean isRunning;

Review Comment:
   Wonder about changing this to track exited which would be set in finally 
block to true.  Running can be false before it started and after its exited, 
just tracking its exited would distinguish between these cases.  Then if a 
thread was not stopped but it exited because of an exception we would know its 
finished.
   
   ```suggestion
         private final boolean exited;
   ```



-- 
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]

Reply via email to