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

Benedict commented on CASSANDRA-14770:
--------------------------------------

Simple patch [here|https://github.com/belliottsmith/cassandra/tree/14770], 
[CI|https://circleci.com/workflow-run/2b3ca5da-1dd6-4218-98be-d5e1784c03d6]

> Introduce RangesAtEndpoint.unwrap to simplify StreamSession.addTransferRanges
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-14770
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14770
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Streaming and Messaging
>            Reporter: Benedict
>            Assignee: Benedict
>            Priority: Trivial
>             Fix For: 4.0
>
>
> Arguably, since this is only performed in one place, we could leave it in 
> {{addTransferRanges}}, but it should be a helper method anyway, and given 
> {{unwrap()}} is a feature of {{Range}}, we should implement that in 
> {{RangesAtEndpoint}} IMO.  I have introduced this method, which avoids 
> allocating a new collection unnecessarily, corroborates we have at most one 
> wrap-around range, and introduced unit tests for the method.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to