You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/04/20 15:41:04 UTC

[GitHub] [accumulo] keith-turner commented on a change in pull request #2025: Fix bug in DefaultKeySizeConstraint

keith-turner commented on a change in pull request #2025:
URL: https://github.com/apache/accumulo/pull/2025#discussion_r616807473



##########
File path: core/src/main/java/org/apache/accumulo/core/constraints/DefaultKeySizeConstraint.java
##########
@@ -53,16 +53,14 @@ public String getViolationDescription(short violationCode) {
       return NO_VIOLATIONS;
 
     List<Short> violations = new ArrayList<>();
-
+    int size = mutation.getRow().length;
     for (ColumnUpdate cu : mutation.getUpdates()) {
-      int size = mutation.getRow().length;

Review comment:
       The limited documentation on the class says it limits the size of keys.  A column update would correspond to a key, so the existing code may correct.  One change would be that it could break out of the loop after adding the first violation.  




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org