ctubbsii commented on code in PR #5431:
URL: https://github.com/apache/accumulo/pull/5431#discussion_r2015010043


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchWriter.java:
##########
@@ -919,13 +920,10 @@ public void send(TabletServerMutations<Mutation> tsm)
         } catch (IOException e) {
           log.debug("failed to send mutations to {}", location, e);
 
-          HashSet<TableId> tables = new HashSet<>();
-          for (KeyExtent ke : mutationBatch.keySet()) {
-            tables.add(ke.tableId());
-          }
-
-          for (TableId table : tables) {
-            getLocator(table).invalidateCache(context, location);
+          Map<TableId,List<KeyExtent>> perTableExtents =
+              
mutationBatch.keySet().stream().collect(Collectors.groupingBy(KeyExtent::tableId));
+          for (var entry : perTableExtents.entrySet()) {
+            getLocator(entry.getKey()).invalidateCache(entry.getValue());

Review Comment:
   ```suggestion
             
mutationBatch.keySet().stream().collect(Collectors.groupingBy(KeyExtent::tableId))
                 .forEach((k, v) -> getLocator(k).invalidateCache(v));
   ```



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