You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benedict (JIRA)" <ji...@apache.org> on 2014/02/20 12:56:19 UTC

[jira] [Updated] (CASSANDRA-6662) Sort/reconcile cells in ArrayBackedSortedColumns only when an accessor is called

     [ https://issues.apache.org/jira/browse/CASSANDRA-6662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benedict updated CASSANDRA-6662:
--------------------------------

    Attachment: patch

Attaching patch with a few possible changes:

- We can avoid making size volatile (when dealing with CASSANDRA-6742) if we just keep the size modifications in a local variable in sortCells(). This is probably better anyway, and whilst it probably won't have much impact on x86, there's a good chance it will on other platforms
- I've added a unitFactory which creates an ABSC with only one item, for use in SI.insert()/delete() . We may be able to switch to it in other places as well.
- I've added an optimised addAll(), with fast paths for inserting with the current set is empty. It might be worth optimising when non-empty as well, but this seems like the biggest win and easy to apply. This helps in some SI search methods, but in general adding to a new ABSC is a pretty common pattern.

> Sort/reconcile cells in ArrayBackedSortedColumns only when an accessor is called
> --------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6662
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6662
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Aleksey Yeschenko
>            Assignee: Aleksey Yeschenko
>             Fix For: 2.1 beta1
>
>         Attachments: patch
>
>
> To avoid poor performance with huge numbers of cells added out of order (which should be rare, but *can* happen with certain batch scenarios) we should make ABSC only sort/reconcile its cells when an actual accessor is actually called, delaying sorting until the very end.



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