kevinrr888 commented on code in PR #5798: URL: https://github.com/apache/accumulo/pull/5798#discussion_r2307494150
########## 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: Leaving as is. Moving this to FateMetrics update() wouldn't work as the fate executor could be removed before the update() is run, which would leave metrics registered that should have been removed. -- 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: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org