keith-turner commented on code in PR #5391:
URL: https://github.com/apache/accumulo/pull/5391#discussion_r1986105718
##########
server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java:
##########
@@ -295,8 +302,12 @@ public void
deleteConfirmedCandidates(SortedMap<String,GcCandidate> confirmedDel
final List<Pair<Path,Path>> replacements = context.getVolumeReplacements();
+ log.debug("Batch {} attempting to delete {} gcCandidate files",
batchCount.get(),
Review Comment:
Could bump this up to info because per batch messages could be at a higher
level than per file message.
##########
server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java:
##########
@@ -492,6 +511,10 @@ static void minimizeDeletes(SortedMap<String,GcCandidate>
confirmedDeletes,
}
}
}
+ if (progressTimer.hasElapsed(Duration.ofMinutes(1))) {
Review Comment:
This is outside the while loop, was it intended to be inside? If it is
intended to be inside the while loop removes stuff from confirmedDeletes, so
not sure if that matters for calling size() inside the loop.
##########
server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java:
##########
@@ -368,6 +379,11 @@ public void
deleteConfirmedCandidates(SortedMap<String,GcCandidate> confirmedDel
};
deleteThreadPool.execute(deleteTask);
+ if (timer.hasElapsed(Duration.ofMinutes(1))) {
+ log.info("Batch {} deleting file {} of {}", batchCount.get(),
deleteCounter,
Review Comment:
This may not give the desired progress information because these messages
are happening as things are queued on the pool which could run very quickly.
Another way this could be done is by adding the code in the while loop that
waits on termination and removing this code. The following is one way to do
this, however the cast is really sketchy. Need to do the cast to get the
thread pools queue.
```
while (!deleteThreadPool.awaitTermination(1000,
TimeUnit.MILLISECONDS)) {
if (timer.hasElapsed(Duration.ofMinutes(1))) {
int numRemaining =
((ThreadPoolExecutor)deleteThreadPool).getQueue().size();
int numProcessed = confirmedDeletes.size() - numRemaining;
log.info("Batch {} deleting file {} of {}", batchCount.get(),
numProcessed,
confirmedDeletes.size());
timer.restart();
}
}
```
--
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]