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

Sylvain Lebresne commented on CASSANDRA-3872:
---------------------------------------------

Apologies, I didn't realized that there was actually kind of 2 problems and I 
mixed both, so let's be more precise.

The regression that CASSANDRA-3716 introduced and that is making the tests fail 
is that a *live* super column with only non-gcable tombstones is now considered 
irrelevant, while it is relevant in say 1.0.

That led me to realize that containers are using MIN_VALUE for gLDT when not 
deleted. Now, leaving aside the tests failure, I do think we should change 
that. Post-CASSANDRA-3716, we've made sure that for normal columns, testing 
{{getLocalDeletionTime() < gcbefore}} allows us solely to decide whether the 
column is gcable (and thus by extension tombstoned) or not. I think it's a good 
thing, the local deletion time is here for the tombstone gc and so that makes 
sense. But currently, this is not true for SuperColumns nor ColumnFamily (but 
it's worst for SC since they actually are IColumn), where 
{{getLocalDeletionTime() < gcbefore}} means 'either gcable or not deleted at 
all'. Leaving things that way would be very error-prone imho and defeat the 
purpose of CASSANDRA-3716 since we're reintroducing subtle differences that are 
hard to work with.

Now, as it happens, I think we have an old bug in QF.isRelevant (i.e. including 
in 0.8 and probably before that). Namely that a *live* SC with only non-gcable 
tombstones is considered relevant, but a *gcable* SC with only non-gcable is 
considered irrelevant but I don't think it should. To fix that, we can indeed 
do the mostRecentChangeAt change (and that would fix the unit tests in 
particular but as said above, I think we should still do the 
MIN_VALUE->MAX_VALUE change for other reasons). However, that would imply that 
*gcable* SC with only *gcable* tombstones would be considered relevant (if the 
max tombstone timestamp is greater than the SC timestamp), so maybe we want to 
switch to a column.mostRecentNonGcableChangeAt() instead.
I'll open a separate ticket for that change, as this affect previous version 
too. I'm leaving this one open to focus on the MIN_VALUE->MAX_VALUE change.
                
> Sub-columns removal is broken in 1.1
> ------------------------------------
>
>                 Key: CASSANDRA-3872
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3872
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>             Fix For: 1.1
>
>         Attachments: 3872.patch
>
>
> CASSANDRA-3716 actually broke sub-columns deletion. The reason is that in 
> QueryFilter.isRelevant, we've switched in checking getLocalDeletionTime() 
> only (without looking for isMarkedForDelete). But for columns containers (in 
> this case SuperColumn), the default local deletion time when not deleted is 
> Integer.MIN_VALUE. In other words, a SC with only non-gcable tombstones will 
> be considered as not relevant (while it should).
> This is caught by two unit tests (RemoveSuperColumnTest and 
> RemoveSubColumnTest) that are failing currently.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to