keith-turner commented on code in PR #3653:
URL: https://github.com/apache/accumulo/pull/3653#discussion_r1273754451


##########
server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java:
##########
@@ -426,8 +426,9 @@ protected void 
updateCompactionCompleted(TExternalCompactionJob job, TCompaction
    * @throws RetriesExceededException thrown when retries have been exceeded
    */
   protected TExternalCompactionJob getNextJob(Supplier<UUID> uuid) throws 
RetriesExceededException {
+    final long checkWaitTime = 
getConfiguration().getTimeInMillis(Property.COMPACTOR_JOB_WAIT_TIME);
     RetryableThriftCall<TExternalCompactionJob> nextJobThriftCall =
-        new RetryableThriftCall<>(1000, RetryableThriftCall.MAX_WAIT_TIME, 0, 
() -> {
+        new RetryableThriftCall<>(checkWaitTime, checkWaitTime, 0, () -> {

Review Comment:
   With this change there is no longer exponential backoff when the queue keeps 
being empty.  The following would still allow the exponential backoff.
   
   ```suggestion
           long maxWaitTime = 
getConfiguration().getTimeInMillis(Property.COMPACTOR_JOB_WAIT_MAX_TIME);
           long minWaitTime = Math.min(1000, maxWaitTime);
           new RetryableThriftCall<>(minWaitTime, maxWaitTime, 0, () -> {
   ```



##########
core/src/main/java/org/apache/accumulo/core/conf/Property.java:
##########
@@ -1098,6 +1098,8 @@ public enum Property {
   @Experimental
   COMPACTOR_CLIENTPORT("compactor.port.client", "9133", PropertyType.PORT,
       "The port used for handling client connections on the compactor 
servers", "2.1.0"),
+  COMPACTOR_JOB_WAIT_TIME("compactor.wait.time.job", "1s", 
PropertyType.TIMEDURATION,
+      "The amount of time to wait between checks for the next compaction job", 
"4.0.0"),

Review Comment:
   ```suggestion
     COMPACTOR_JOB_WAIT_MAX_TIME("compactor.wait.time.job", "5m", 
PropertyType.TIMEDURATION,
         "The maximum amount of time to wait between checks for the next 
compaction job.  Compactors do exponential backoff when their request for work 
repeatedly come back empty.  This is the max time the exponential backoff can 
grow to", "4.0.0"),
   ```



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