[
https://issues.apache.org/jira/browse/CASSANDRA-13603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16056539#comment-16056539
]
Jeff Jirsa edited comment on CASSANDRA-13603 at 6/20/17 9:57 PM:
-----------------------------------------------------------------
{quote}
We already check node instanceof Leaf before recursively calling
differenceHelper() with a sub-range. I'd suggest to do the same in
difference(). It just doesn't make sense to call differenceHelper() with two
leaf nodes, doesn't it?
{quote}
I think you're right - pushed a new commit to each branch that checks to see if
either node is {{instanceof Leaf}} and avoids that tree traversal. Also marked
{{MerkleTree.differenceHelper}} as {{@VisibleForTesting}}
I think this makes the midpoint check below irrelevant, but may protect us from
another bug later? Considering switching it to an assert rather than the block
that exists now?
{code}
if (midpoint.equals(active.left) || midpoint.equals(active.right))
{code}
was (Author: jjirsa):
{quote}
We already check node instanceof Leaf before recursively calling
differenceHelper() with a sub-range. I'd suggest to do the same in
difference(). It just doesn't make sense to call differenceHelper() with two
leaf nodes, doesn't it?
{quote}
I think you're right - pushed a new commit to each branch that checks to see if
either node is {{instanceof Leaf}} and avoids that tree traversal. Also marked
{{MerkleTree.differenceHelper}} as {{@VisibleForTesting}}
I think this makes the midpoint check below irrelevant, but may protect us from
another bug later? On the fence with removing it - seems like we shouldn't hit
us, but maybe is saves us in a future release?
{code}
if (midpoint.equals(active.left) || midpoint.equals(active.right))
{code}
> Change repair midpoint logging from CASSANDRA-13052
> ----------------------------------------------------
>
> Key: CASSANDRA-13603
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13603
> Project: Cassandra
> Issue Type: Bug
> Components: Streaming and Messaging
> Reporter: Jeff Jirsa
> Assignee: Jeff Jirsa
> Priority: Trivial
> Fix For: 3.0.x, 3.11.x, 4.x
>
>
> In CASSANDRA-13052 , we changed the way we handle repairs on small ranges to
> make them more sane in general, but {{MerkleTree.differenceHelper}} now
> erroneously logs at error.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]