ctubbsii commented on code in PR #3349:
URL: https://github.com/apache/accumulo/pull/3349#discussion_r1181963021
##########
server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionFinalizer.java:
##########
@@ -155,7 +155,7 @@ private void processPending() {
Map<KeyExtent,TabletMetadata> tabletsMetadata;
var extents =
batch.stream().map(ExternalCompactionFinalState::getExtent).collect(toList());
- try (TabletsMetadata tablets =
context.getAmple().readTablets().forTablets(extents)
+ try (TabletsMetadata tablets =
context.getAmple().readTablets().forTablets(extents, e -> {})
Review Comment:
I made this comment before making my other comment. I think in the absence
of a named lambda, a small inline comment explaining `e -> {}` would help. At a
glance, it looks like a bug, because it looks like you're iterating over
tablets, but not doing anything with them (because `forTablets` looks like a
terminal operation like `forEach`), so this looks like `forEach(e -> { /* noop
*/})`. But naming the lambda as I suggested in my other comment is the most
concise explanation that the NOOP consumer was chosen on purpose.
--
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]