[ 
https://issues.apache.org/jira/browse/CASSANDRA-7279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-7279:
----------------------------------------

    Attachment: 7279_alternative.txt

Attaching a patch for how I would do this. It only deoverlap/sort slices for 
thrift, but does validate (in an assertion) the slices for CQL "to avoid 
whatever future bug everyone seems to assume we'll introduce". I'll note that 
said validation is more thorough than what the de-overlapping method would 
protect against since it validates that each slices in the proper order (while 
the de-overlapping method would have silently do the wrong thing in that case, 
potentially hiding a bug deeper rather than protecting against one).

The patch also fix 2 bugs in the handling of the empty finish bounds by the 
de-overlapping function: 1) in the initial sorting, it is the finish bound that 
should be special cased, the start bound is automatically handled by the 
comparator, and 2) later the finish bound also needs special casing when 
testing for inclusion. Both are covered by additional unit tests. 

> MultiSliceTest.test_with_overlap* unit tests failing in trunk
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-7279
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7279
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tests
>            Reporter: Michael Shuler
>            Assignee: T Jake Luciani
>            Priority: Minor
>             Fix For: 2.1 rc1, 3.0
>
>         Attachments: 7279-trunk.txt, 7279-trunkv2.txt, 7279-trunkv3.txt, 
> 7279-trunkv4.txt, 7279_alternative.txt
>
>
> Example:
> https://cassci.datastax.com/job/trunk_utest/623/testReport/org.apache.cassandra.thrift/MultiSliceTest/



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to