milleruntime commented on a change in pull request #2283:
URL: https://github.com/apache/accumulo/pull/2283#discussion_r716650518
##########
File path: server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
##########
@@ -484,6 +485,17 @@ public void run() {
}
}).start();
+ Threads.createThread("Compaction fetcher", () -> {
+ while (true) {
+ try {
+ fetchCompactions();
+ } catch (Exception e) {
+ log.warn("{}", e.getMessage(), e);
+ }
+ sleepUninterruptibly(5, TimeUnit.SECONDS);
+ }
+ }).start();
+
Review comment:
> The problem with this pattern is that there's a constant background
thread doing RPC calls to the tservers to collect these stats, even if nobody
is accessing the page on the monitor. And, it has to talk to every tserver, of
which there could be thousands. This is a lot of constant activity that might
not even be needed. The general pattern of the monitor is to avoid refreshing
data if nobody is accessing the page, and to limit the refresh of the data
shown on the page to collect it no more frequently than once every 5 seconds.
This is how we collect the "mmi" object, anyway.
>
> Fast display should not bog down the cluster like this.
This is also currently being done for active scans. So if it's an issue with
the fetch compactions thread, we should do something with the scans fetch as
well.
--
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]