dlmarion commented on code in PR #3555:
URL: https://github.com/apache/accumulo/pull/3555#discussion_r1251060862


##########
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java:
##########
@@ -1247,20 +1247,21 @@ private Optional<CompactionInfo> 
reserveFilesForCompaction(CompactionServiceId s
     // check is done after the file are exclusively reserved in this class to 
avoid race conditions.
     if (!tablet.getDatafiles().keySet().containsAll(cInfo.jobFiles)) {
       // The tablet does not know of all these files, so unreserve them.
-      completeCompaction(job, cInfo.jobFiles, Optional.empty(), true);
+      completeCompaction(job, cInfo.jobFiles, Optional.empty());
       return Optional.empty();
     }
 
     return Optional.of(cInfo);
   }
 
   private void completeCompaction(CompactionJob job, Set<StoredTabletFile> 
jobFiles,
-      Optional<StoredTabletFile> metaFile, boolean successful) {
+      Optional<StoredTabletFile> metaFile) {
     synchronized (this) {
       Preconditions.checkState(removeJob(job));
-      if (successful) {
-        fileMgr.completed(job, jobFiles, metaFile);
-      }
+      // If the compaction failed, then metaFile will be null.
+      // This is expected and the set of files for the compaction
+      // will be released so that it can be retried.
+      fileMgr.completed(job, jobFiles, metaFile);

Review Comment:
   I reverted the removal of the successful parameter in 8d3072d. I added an IT 
that runs a compaction that produces no data and confirms that the tablet has 
no file.



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