This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a commit to branch 2.1 in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/2.1 by this push: new 6c7f6d28a5 Changed how mutations are collected in LogSorter.writeBuffer (#5497) 6c7f6d28a5 is described below commit 6c7f6d28a55b8d9c1eb874f81fc16b8b2f7d0cb8 Author: Dave Marion <dlmar...@apache.org> AuthorDate: Wed Apr 23 13:23:55 2025 -0400 Changed how mutations are collected in LogSorter.writeBuffer (#5497) The old code collected mutations by creating a new list, copying existing and new mutations into it, and putting the list into a map. The new code creates a single list, adds all of the mutations to that list, and puts the list in the map. Closes #5496 --- .../src/main/java/org/apache/accumulo/tserver/log/LogSorter.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java index 442b2f85f9..f0653b6d3f 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java @@ -274,12 +274,7 @@ public class LogSorter { var logFileKey = pair.getFirst(); var logFileValue = pair.getSecond(); Key k = logFileKey.toKey(); - var list = keyListMap.putIfAbsent(k, logFileValue.mutations); - if (list != null) { - var muts = new ArrayList<>(list); - muts.addAll(logFileValue.mutations); - keyListMap.put(logFileKey.toKey(), muts); - } + keyListMap.computeIfAbsent(k, (key) -> new ArrayList<>()).addAll(logFileValue.mutations); } try (var writer = FileOperations.getInstance().newWriterBuilder()