[ 
https://issues.apache.org/jira/browse/CASSANDRA-13603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16053833#comment-16053833
 ] 

Stefan Podkowinski commented on CASSANDRA-13603:
------------------------------------------------

I agree that it's easy to misuse MerkleTree.differenceHelper(). It should only 
really be called from MerkleTree.difference() and should have a  
{{@VisibleForTesting}} annotation to indicate that it's internal use only. As 
for the suggested changes around midpoint result handling, I'm not really 
convinced that we should use this value to check if we should stop tree 
traversal. Although we should be at a leaf nodes already when getting an 
invalid midpoint value, we wouldn't be able to tell otherwise without any kind 
of error message, blindly following this assumption. This may cover other 
potential errors.

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?

> 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: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to