ddanielr commented on code in PR #4223:
URL: https://github.com/apache/accumulo/pull/4223#discussion_r1478785815


##########
server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java:
##########
@@ -449,9 +449,11 @@ protected void 
updateCompactionCompleted(TExternalCompactionJob job, TCompaction
   protected TExternalCompactionJob getNextJob(Supplier<UUID> uuid) throws 
RetriesExceededException {
     final long startingWaitTime =
         
getConfiguration().getTimeInMillis(Property.COMPACTOR_MIN_JOB_WAIT_TIME);
+    final long maxWaitTime =
+        
getConfiguration().getTimeInMillis(Property.COMPACTOR_MAX_JOB_WAIT_TIME);
 
     RetryableThriftCall<TExternalCompactionJob> nextJobThriftCall =
-        new RetryableThriftCall<>(startingWaitTime, 
RetryableThriftCall.MAX_WAIT_TIME, 0, () -> {
+        new RetryableThriftCall<>(startingWaitTime, maxWaitTime, 0, () -> {

Review Comment:
   The goal of the `compactor.wait.time.job.max` property is to configure the 
max interval of time that a compactor is waiting between requests to the 
compaction-coordinator for a new compaction job.  
   
   The expectation is that this change only ensures that compactor's thrift 
communication when a compaction-coordinator is down matches its thrift 
communication when no work is available. 
   
   Since maxRetries are still set to 0, the compactor will attempt this thrift 
operation indefinitely and will not calculate additional sleep logic. 
   
   Based on the Retry code, we get some number of connection attempts before we 
hit the max wait value so thrift would attempt a number of retry attempts until 
the wait factor is equal to our `wait.time.job.max` value and stops increasing. 
   
   
https://github.com/apache/accumulo/blob/354be4fbaaa23df7a0377a35135dcd04eee18d4f/core/src/main/java/org/apache/accumulo/core/util/Retry.java#L186-L189
 
   
   
https://github.com/apache/accumulo/blob/49b24bcc325892a97208715e2cfa6d28dc162bc3/server/base/src/main/java/org/apache/accumulo/server/compaction/RetryableThriftCall.java#L81-L84
   
   From a user's perspective, this would mean that this log message would show 
on the first attempt at 1 second, then on every subsequent attempt until the 
wait period hit the max retry of 5 minutes. Then it would repeat on a 5 min 
interval.
   
   
https://github.com/apache/accumulo/blob/49b24bcc325892a97208715e2cfa6d28dc162bc3/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java#L455
   
   This would match the same logging behavior as a compactor that successfully 
connected and was returned no work.



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