DomGarguilo commented on code in PR #4740:
URL: https://github.com/apache/accumulo/pull/4740#discussion_r1676215427


##########
server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java:
##########
@@ -702,16 +701,11 @@ public void run() {
     try {
 
       final AtomicReference<Throwable> err = new AtomicReference<>();
-      final AtomicLong timeSinceLastCompletion = new AtomicLong(0L);
+      final AtomicBoolean isIdle = new AtomicBoolean(true);
 
       while (!shutdown) {
 
-        idleProcessCheck(() -> {
-          return timeSinceLastCompletion.get() == 0
-              /* Never started a compaction */ || 
(timeSinceLastCompletion.get() > 0
-                  && (System.nanoTime() - timeSinceLastCompletion.get())
-                      > idleReportingPeriodNanos);
-        });
+        idleProcessCheck(isIdle::get);

Review Comment:
   I also tried this with no luck. With this approach I do not see the value 
for the compactor idle metric leave the value its is initialized to (-1). 



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