cshannon commented on code in PR #4254:
URL: https://github.com/apache/accumulo/pull/4254#discussion_r1493068858


##########
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/compact/CleanUp.java:
##########
@@ -74,16 +75,21 @@ public long isReady(FateId fateId, Manager manager) throws 
Exception {
 
     try (
         var tablets = 
ample.readTablets().forTable(tableId).overlapping(startRow, endRow)
-            .fetch(PREV_ROW, COMPACTED).checkConsistency().build();
+            .fetch(PREV_ROW, COMPACTED, 
USER_COMPACTION_REQUESTED).checkConsistency().build();
         var tabletsMutator = ample.conditionallyMutateTablets(resultConsumer)) 
{
 
       t1 = System.nanoTime();
       for (TabletMetadata tablet : tablets) {
         total++;
         if (tablet.getCompacted().contains(fateId)) {
-          
tabletsMutator.mutateTablet(tablet.getExtent()).requireAbsentOperation()
-              .requireSame(tablet, COMPACTED).deleteCompacted(fateId)
-              .submit(tabletMetadata -> 
!tabletMetadata.getCompacted().contains(fateId));
+          var mutator = 
tabletsMutator.mutateTablet(tablet.getExtent()).requireAbsentOperation()
+              .requireSame(tablet, COMPACTED).deleteCompacted(fateId);
+          if (tablet.getUserCompactionsRequested().contains(fateId)) {
+            mutator.deleteUserCompactionRequested(fateId);
+          }
+
+          mutator.submit(tabletMetadata -> 
!tabletMetadata.getCompacted().contains(fateId)
+              && 
!tabletMetadata.getUserCompactionsRequested().contains(fateId));
           submitted++;
         }

Review Comment:
   This was refactored to make the checks independent (still one mutation)



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