kevinrr888 commented on code in PR #5798:
URL: https://github.com/apache/accumulo/pull/5798#discussion_r2274734810
##########
core/src/main/java/org/apache/accumulo/core/fate/FateExecutor.java:
##########
@@ -201,17 +208,23 @@ protected Set<Fate.FateOperation> getFateOps() {
return fateOps;
}
+ public FateExecutorMetrics<T> getFateExecutorMetrics() {
+ return fateExecutorMetrics;
+ }
+
/**
* 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.
+ * terminate after they are done with their current transaction, if
applicable, the work finder is
+ * interrupted, and the metrics created for this FateExecutor are removed
from the registry (if
+ * metrics were enabled). {@link #isShutdown()} returns true after this is
called.
*/
protected void initiateShutdown() {
transactionExecutor.shutdown();
synchronized (runningTxRunners) {
runningTxRunners.forEach(TransactionRunner::flagStop);
}
+ fateExecutorMetrics.clearMetrics();
workFinder.interrupt();
}
Review Comment:
Or, maybe should move this into FateMetrics update() method so metrics are
handled only in appropriate metrics classes. However, metrics will not be
cleared immediately in this case. Will occur whenever the update() runs.
--
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]