This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit 605a2c021bdff63d6d7591792b35f7fafd37a1f0 Merge: 94363afcf4 7ae2b3355f Author: Christopher Tubbs <[email protected]> AuthorDate: Thu Aug 6 15:49:27 2026 -0400 Merge branch '2.1' .../java/org/apache/accumulo/core/data/Mutation.java | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --cc core/src/main/java/org/apache/accumulo/core/data/Mutation.java index ef78bb7dc8,3a15e5d94c..61a27dc029 --- a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java +++ b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java @@@ -71,10 -71,15 +71,17 @@@ import edu.umd.cs.findbugs.annotations. * support different subset of fields and types. The functionality of all of these {@code put} * methods and more is provided by the new fluent {@link #at()} method added in 2.0. */ +@SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", + justification = "Constructor validation is required for proper initialization") public class Mutation implements Writable { + // the exact upper boundary for the initial array size doesn't matter, so long as it's high enough + // to avoid resizing if the user has any reasonable number of column updates in a single mutation; + // this value, near 100_000, was chosen to try to optimize memory allocation to typical hardware + // page sizes, accounting for 16 bytes overhead for the array, that works with either 32-bit + // compressed object references or native 64-bit references, while keeping the value reasonable + private static final int MAX_INITIAL_ARRAY_SIZE = 100_348; + /** * Internally, this class keeps most mutation data in a byte buffer. If a cell value put into a * mutation exceeds this size, then it is stored in a separate buffer, and a reference to it is
