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


##########
server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java:
##########
@@ -809,22 +903,25 @@ public void run() {
                     new TCompactionStatusUpdate(TCompactionState.CANCELLED, 
"Compaction cancelled",
                         -1, -1, -1, fcr.getCompactionAge().toNanos());
                 updateCompactionState(job, update);
-                updateCompactionFailed(job);
+                updateCompactionFailed(job, null);
               } catch (RetriesExceededException e) {
                 LOG.error("Error updating coordinator with compaction 
cancellation.", e);
               } finally {
                 currentCompactionId.set(null);
               }
             } else if (err.get() != null) {
-              KeyExtent fromThriftExtent = 
KeyExtent.fromThrift(job.getExtent());
+              final KeyExtent fromThriftExtent = 
KeyExtent.fromThrift(job.getExtent());
               try {
                 LOG.info("Updating coordinator with compaction failure: id: 
{}, extent: {}",
                     job.getExternalCompactionId(), fromThriftExtent);
                 TCompactionStatusUpdate update = new TCompactionStatusUpdate(
                     TCompactionState.FAILED, "Compaction failed due to: " + 
err.get().getMessage(),
                     -1, -1, -1, fcr.getCompactionAge().toNanos());
                 updateCompactionState(job, update);
-                updateCompactionFailed(job);
+                updateCompactionFailed(job, err.get());
+                long failures = 
errorHistory.addError(fromThriftExtent.tableId(), err.get());
+                LOG.warn("Compaction for table {} has failed {} times", 
fromThriftExtent.tableId(),

Review Comment:
   Is this logging redundant? Looking in the logs I see the same info logged 
close by.  Not sure if they both always log.
   
   ```
   2025-07-15T21:42:28,285 [compactor.Compactor] WARN : Compaction for table 2 
has failed 10 times
   2025-07-15T21:42:28,285 [compactor.Compactor] WARN : This Compactor has had 
14 consecutive failures. Failures: 
   Table: 1
           Exception: java.lang.ClassNotFoundException: 
org.apache.accumulo.testing.continuous.ValidatingIterator, count: 4Table: 2
           Exception: java.lang.ClassNotFoundException: 
org.apache.accumulo.testing.continuous.MissingIter, count: 10
   
   ```
   
   



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