jmark99 commented on a change in pull request #2214:
URL: https://github.com/apache/accumulo/pull/2214#discussion_r677544523
##########
File path:
server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionAlgorithm.java
##########
@@ -290,30 +290,26 @@ private void deleteConfirmed(GarbageCollectionEnvironment
gce,
cleanUpDeletedTableDirs(gce, candidateMap);
}
- public void collect(GarbageCollectionEnvironment gce) throws
TableNotFoundException, IOException {
-
- String lastCandidate = "";
-
- boolean outOfMemory = true;
- while (outOfMemory) {
- List<String> candidates = new ArrayList<>();
+ /**
+ * Given a sub-list of possible delection candidates, process and remove
valid deletion
+ * candidates.
+ */
+ public void collectBatch(GarbageCollectionEnvironment gce, List<String>
currentBatch)
+ throws TableNotFoundException, IOException {
- outOfMemory = getCandidates(gce, lastCandidate, candidates);
-
- if (candidates.isEmpty())
- break;
- else
- lastCandidate = candidates.get(candidates.size() - 1);
+ long origSize = currentBatch.size();
+ gce.incrementCandidatesStat(origSize);
- long origSize = candidates.size();
- gce.incrementCandidatesStat(origSize);
+ SortedMap<String,String> candidateMap = makeRelative(currentBatch);
- SortedMap<String,String> candidateMap = makeRelative(candidates);
+ confirmDeletesTrace(gce, candidateMap);
+ gce.incrementInUseStat(origSize - candidateMap.size());
- confirmDeletesTrace(gce, candidateMap);
- gce.incrementInUseStat(origSize - candidateMap.size());
+ deleteConfirmed(gce, candidateMap);
+ }
Review comment:
@keith-turner that was exactly the cause.
--
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]