cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Tunnicliffe (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-13525) ReverseIndexedReader may drop rows during 2.1 to 3.0 upgrade
Date Thu, 11 May 2017 11:53:04 GMT


Sam Tunnicliffe updated CASSANDRA-13525:
    Reproduced In: 3.10, 3.0.13  (was: 3.0.13, 3.10)
           Status: Patch Available  (was: Open)

The problem occurs when a row spans an block in the row index. When deciding whether to continue
reading from disk or move to the next index block, {{UnfilteredDeserializer.OldFormatDeserializer}}
accounts for the fact that {{hasNext()}} has bumped the file pointer past the end of the last
consumed {{Unfiltered}}. But, it doesn't account for reading the legacy atoms from disk to
feed the unfiltered iterator. The legacy atom iterator actually reads the first atom of the
{{Unfiltered}} *after* the next one, so that needs to be included when calculating the {{lastConsumedPosition}},
which in turn determines whether the current index block has been exhausted. This only affects
the reverse iterator as it's mitigation for rows which cross index block boundaries is more
complex than the forward iterator. 

For 3.0, I've pushed [a branch|] with a
fix and unit test. Also, it adds a unit test for CASSANDRA-13236 (there's a [dtest PR|]
open already), this issue was discovered during investigation into that one but I struggled
to figure out a decent unit test for it at the time. 

The 3.11 branch should be pretty much identical, but merging 3.0 -> 3.11 is broken at the
moment, (looks like [263740daa4|]
needs to be merged with {{-s ours}}, but I'll double check). When that's fixed I'll push a
3.11 branch.

> ReverseIndexedReader may drop rows during 2.1 to 3.0 upgrade
> ------------------------------------------------------------
>                 Key: CASSANDRA-13525
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local Write-Read Paths
>            Reporter: Sam Tunnicliffe
>            Assignee: Sam Tunnicliffe
> During an upgrade from 2.1 (or 2.2) to 3.0 (or 3.x) queries which perform reverse iteration
may silently drop rows from their results. This can happen before sstableupgrade is run and
when the sstables are indexed.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message