PrashantBhanage commented on code in PR #13696:
URL: https://github.com/apache/cloudstack/pull/13696#discussion_r3650170715
##########
plugins/integrations/prometheus/src/main/java/org/apache/cloudstack/metrics/PrometheusExporterServerImpl.java:
##########
@@ -108,6 +113,10 @@ public boolean stop() {
httpServer.stop(0);
logger.debug("Stopped Prometheus exporter http server");
}
+ if (httpExecutor != null) {
+ httpExecutor.shutdownNow();
+ logger.debug("Shut down Prometheus exporter http executor");
+ }
Review Comment:
> btw, I genuinely don’t understand this part of the change, I’ll read the
co-pilot comment on the original issue as well. So if the executor is
shutdown(), can start() still be called on it? (for instance) And why a
newFixedThreadPool of 2?
Pushed 8637b6d — scoped setExecutor(null) inside the existing
httpServer null-check (your suggested diff had it unconditional, which
would NPE if start() never created a server) and nulled out
httpExecutor too.
--
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]