Benjamin Lerer reassigned CASSANDRA-12795:

    Assignee: Benjamin Lerer

> CASSANDRA-12127 changes ordering of empty buffers in reversed columns
> ---------------------------------------------------------------------
>                 Key: CASSANDRA-12795
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12795
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Tim Whittington
>            Assignee: Benjamin Lerer
> A change to the ordering contract of empty buffers in reversed columns was 
> introduced for all maintained branches (2.1.16, 2.2.8, 3.0.9, 3.8) during the 
> fix for CASSANDRA-12127 by [~blerer].
> This change has wider consequences than those stated in the [comment 
> introducing the 
> change|https://issues.apache.org/jira/browse/CASSANDRA-12127?focusedCommentId=15368345&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15368345]
>  though, and the implications aren't really called out in the release notes 
> clearly, so rather than litigate it in the comments I'm creating a new issue 
> to get a clear public position on the change.
> The change made was to alter the contract that the ordering of an empty byte 
> buffer is always < a non empty byte buffer, in both ASC and DESC contexts - 
> specifically the change introduced in 0.8 as the fix for CASSANDRA-3111 to 
> make empty buffers < valued buffers in  ReversedType was reverted.
> This changes the ordering of empty buffers in clustered columns with DESC 
> ordering, but also in DynamicCompositeType (and CompositeType) values with 
> DESC components. We have production code and data that relies on this 
> behaviour, and it's not clear from the release notes whether the updates to 
> scrub will also correct that data.
> So the questions I have are:
> * Was the existing behavior actually 'wrong', requiring a change? What was 
> the actual (functional/specification) bug that was fixed by the change?
> * Is the new behavior the desired behavior in general? The new behavior is 
> more inline with 'typical' RDMS behaviour of ordering now, but then again 
> they tend to support per-query NULLS FIRST/NULLS LAST, so there's no strict 
> 'right' behaviour here.
> * Did this change introduce a regression for CASSANDRA-3111?
> * Will the scrub approach fix the ordering of empty buffer values in 
> DynamicCompositeType columns? If not, what do we do with production data 
> created pre-2.2.8 mixed with data created with 2.2.8?

This message was sent by Atlassian JIRA

Reply via email to