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

Sam Tunnicliffe commented on CASSANDRA-6640:
--------------------------------------------

I'm afraid this patch doesn't apply to trunk anymore, since CASSANDRA-5549 made 
some fairly heavy changes to ASPCSI. That said, the rebase shouldn't be too 
tough. Checking the patch against an earlier revision (00fc318) it looks good 
and the tests for CASSANDRA-5540 still pass. 

Couple of minor nits:
* The javadoc for PCSI.update should be updated with the new argument. 
* The comment in SIM.update that refers to CASSANDRA-5540 should probably move 
to ASPCSI.update();


> Improve custom 2i performance and abstraction
> ---------------------------------------------
>
>                 Key: CASSANDRA-6640
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6640
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Miguel Angel Fernandez Diaz
>            Assignee: Miguel Angel Fernandez Diaz
>              Labels: patch, performance
>             Fix For: 2.1
>
>         Attachments: 6640.diff
>
>
> With the current implementation, the method update from SecondaryIndexManager 
> forces to insert and delete a cell. That happens because we assume that we 
> need the value of the old cell in order to locate the cell that we are 
> updating in our custom secondary index implementation. 
> However, depending on the implementation, a insert and a delete operations 
> could have much worse performance than a simple update. Moreover, if our 
> custom secondary index doesn't use inverted indexes, we don't really need the 
> old cell information and the key information is enough. 
> Therefore, a good solution would be to make the update method more abstract. 
> Thus, the update method for PerColumnSecondaryIndex would receive also the 
> old cell information and from that point we could decide if we must carry out 
> the delete+insert operation or just a update operation.
> I attach a patch that implements this solution.  



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to