cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-5712) Reverse slice queries can skip range tombstones
Date Fri, 28 Jun 2013 16:32:20 GMT


Sylvain Lebresne commented on CASSANDRA-5712:

bq. ISTM that we could just special case tombstones in addColumn (rename to addAtom) to always
addFirst regardless of reversed-ness.

I don't think that works :).

We get t(0), c(1), c(2), t(3), c(4) from the reader and we want to ultimately return them
as t(3), t(0), c(4), c(2), c(1).

If we do addFirst for columns and addLast for tombstone, we'll get c(4), c(2), c(1), t(0),
t(3), which gives us all tombstone last (and if we pollLast instead of pollFirst, the columns
won't be reversed). If we do addLast for columns and addFirst for tombstone, we have the exact
equivalent of pollLast in the previous case.

We can probably do some peekLast first and do pollLast as long as it's a tombstone and pollFirst
if it's not, but is that really much of an improvement compared to the patch?

> Reverse slice queries can skip range tombstones
> -----------------------------------------------
>                 Key: CASSANDRA-5712
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>             Fix For: 1.2.7
>         Attachments: 5712.txt
> On disk, we represent range tombstones by a marker at the beginning of the range covered.
Since we repeat such markers when they overlap an index block and since an index block is
always read in forward order (even in reverse queries), we are guaranteed to see a range tombstone
before any column it covers. However, IndexedSliceReader returns the columns of an index block
in reverse order and thus can return a range tombstone *after* columns it covers.
> It follows that some range tombstone can be skipped during a reversed range slice. We
need to fix IndexedSliceReader to always return range tombstone first (or at least before
the first column covered by each range tombstone).

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message