keith-turner commented on a change in pull request #2214:
URL: https://github.com/apache/accumulo/pull/2214#discussion_r677511639
##########
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:
I suspect this is what was causing the CME in the unit test
https://github.com/apache/accumulo/blob/146b1d3d0dc2ade6f1888c9905d83e37d98aedbe/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectionTest.java#L81
--
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]