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

Aleksey Yeschenko commented on CASSANDRA-14766:
-----------------------------------------------

Thanks. Committed to 3.0 as 
[45937def313bbb32024ae890f830e23bcc6ccae5|https://github.com/apache/cassandra/commit/45937def313bbb32024ae890f830e23bcc6ccae5]
 and merged to 3.11, and with {{-s ours}} into trunk.

Dtest committed as 
[02c1cd77439b220a09df1d53891441bb80dcf944|https://github.com/apache/cassandra-dtest/commit/02c1cd77439b220a09df1d53891441bb80dcf944].

NOTE: I did fold {{iterator.hasNext()}} check into the if-branch above on 
commit, to remove one extra level of nesting from the code.

> DESC order reads can fail to return the last Unfiltered in the partition in a 
> legacy sstable
> --------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-14766
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14766
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local Write-Read Paths
>            Reporter: Aleksey Yeschenko
>            Assignee: Aleksey Yeschenko
>            Priority: Major
>             Fix For: 3.0.18, 3.11.4
>
>
> {{OldFormatDeserializer}}’s {{hasNext()}} method can and will consume two 
> {{Unfiltered}} from the underlying iterator in some scenarios - intentionally.
> But in doing that it’s losing intermediate state of {{lastConsumedPosition}}. 
> If that last block, when iterating backwards, only has two {{Unfiltered}}, 
> the first one will be returned, and the last one won’t as the reverse 
> iterator would incorrectly things that the deserisalizer is past the index 
> block, despite still having one {{Unfiltered}} unreturned.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to