cshannon commented on code in PR #4480:
URL: https://github.com/apache/accumulo/pull/4480#discussion_r1605787376
##########
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/compact/CompactionDriver.java:
##########
@@ -241,17 +242,27 @@ public int updateAndCheckTablets(Manager manager, FateId
fateId)
noneSelected++;
} else {
var mutator =
tabletsMutator.mutateTablet(tablet.getExtent()).requireAbsentOperation()
- .requireSame(tablet, FILES, SELECTED, ECOMP, COMPACTED);
- var selectedFiles =
- new SelectedFiles(filesToCompact,
tablet.getFiles().equals(filesToCompact), fateId);
+ .requireSame(tablet, FILES, SELECTED, ECOMP, COMPACTED,
USER_COMPACTION_REQUESTED);
+ var selectedFiles = new SelectedFiles(filesToCompact,
+ tablet.getFiles().equals(filesToCompact), fateId, time);
mutator.putSelectedFiles(selectedFiles);
+ // We no longer need to include this marker if files are selected
+ if (tablet.getUserCompactionsRequested().contains(fateId)) {
+ mutator.deleteUserCompactionRequested(fateId);
+ }
+
selectionsSubmitted.put(tablet.getExtent(), filesToCompact);
+ // TODO: Do we need to handle a race condition for the rejection
handler check
Review Comment:
Alright so the full rejection handler should just look like the following?
Just want to make sure i have it right.
```java
mutator.submit(tabletMetadata -> tabletMetadata.getSelectedFiles() != null
&& tabletMetadata.getSelectedFiles().getFateId().equals(fateId) ||
tabletMetadata.getCompacted().contains(fateId));
```
--
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]