[
https://issues.apache.org/jira/browse/ACCUMULO-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13898188#comment-13898188
]
Vikram Srivastava commented on ACCUMULO-2345:
---------------------------------------------
[~kturner] You are right. Always allocating a Violations object increased both
time and memory taken by 10M runs of check. (Both went up by 200%) So we should
always do it lazily.
One alternative is that we pass the Violations object that we've already
created in Tablet.prepareMutationsForCommit to ContraintChecker.check() which
would add to that Violations object instead of creating a new one and returning
it. Thoughts?
> Improve ConstraintChecker.check
> -------------------------------
>
> Key: ACCUMULO-2345
> URL: https://issues.apache.org/jira/browse/ACCUMULO-2345
> Project: Accumulo
> Issue Type: Improvement
> Components: tserver
> Affects Versions: 1.7.0
> Reporter: Vikram Srivastava
> Assignee: Vikram Srivastava
> Priority: Trivial
> Fix For: 1.7.0
>
> Attachments: ACCUMULO-2345.v1.patch.txt
>
>
> The if-else condition inside {{for}} loop can be merged with try-catch since
> {{throwable}} is not null only if code goes inside the catch section.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)