keith-turner commented on a change in pull request #373: ACCUMULO-4709 sanity check in Mutation URL: https://github.com/apache/accumulo/pull/373#discussion_r167356186
########## File path: core/src/main/java/org/apache/accumulo/core/data/Mutation.java ########## @@ -318,8 +318,8 @@ private void put(byte[] cf, int cfLength, byte[] cq, int cqLength, byte[] cv, bo if (buffer == null) { throw new IllegalStateException("Can not add to mutation after serializing it"); } - estimatedSize += cfLength + cqLength + (hasts ? 8 : 0) + valLength + 2 * 1 + 4 * SERIALIZATION_OVERHEAD; - Preconditions.checkArgument(estimatedSize < MAX_MUTATION_SIZE && estimatedSize >= 0, "Maximum mutation size must be less than 2GB "); + long estimatedSizeAfterPut = estRowAndLargeValSize + buffer.size() + cfLength + cqLength + (hasts ? 8 : 0) + valLength + 2 * 1 + 4 * SERIALIZATION_OVERHEAD; Review comment: Should include `cv.length` in the sum. Is `2*1` for the two booleans (deleted and hasts)? This could be simplified to `2`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services