cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Tunnicliffe (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-5397) Updates to PerRowSecondaryIndex don't use most current values
Date Tue, 02 Apr 2013 12:55:24 GMT

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

Sam Tunnicliffe edited comment on CASSANDRA-5397 at 4/2/13 12:54 PM:
---------------------------------------------------------------------

Patch extends the SecondaryIndexManager.Updater interface to add a commit() method.  Behaviour
for PerColumn indexes remains unchanged, with updates applied to the index immediately and
so the commit is a no-op. For PerRow indexes, the updates are deferred until after the memtable
update occurs, then actioned via the call to commit.  I missed this in CASSANDRA-2897 partially
because there are no implementations of PerRowSecondaryIndex in the codebase, so I've also
added a unit test with a dummy implementation.
                
      was (Author: beobal):
    Patch extends the SecondaryIndexManager.Updater interface to add a commit() method.  Behaviour
for PerColumn indexes remains unchanged, with updates applied to the index immediately and
so the commit is a no-op. For PerRow indexes, the updates are deferred until after the memtable
update occurs, then actioned via the call to commit.  I missed this in CASSANDRA-2987 partially
because there are no implementations of PerRowSecondaryIndex in the codebase, so I've also
added a unit test with a dummy implementation.
                  
> Updates to PerRowSecondaryIndex don't use most current values 
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-5397
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5397
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.2.3
>            Reporter: Sam Tunnicliffe
>            Assignee: Sam Tunnicliffe
>            Priority: Minor
>         Attachments: 5397.txt
>
>
> The way that updates to secondary indexes are performed using  SecondaryIndexManager.Updater
is flawed for PerRowSecondaryIndexes.  Unlike PerColumnSecondaryIndexes, which only require
the old & new values for a single column,  the expectation is that a PerRow indexer can
be given just a key which it will use to retrieve the entire row (or as many columns as it
requires) and perform its indexing on those columns.  As the indexes are updated before the
memtable atomic swap occurs, a per-row indexer may only read the previous values for the row,
not the new ones that are being written. In the case of an insert, there is no previous value
and so nothing is added to the index.

--
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: http://www.atlassian.com/software/jira

Mime
View raw message