cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-6662) Sort/reconcile cells in ArrayBackedSortedColumns only when an accessor is called
Date Tue, 11 Feb 2014 18:24:23 GMT


Benedict commented on CASSANDRA-6662:

bq. It should have a significant enough effect on CollationController.collectTimeOrderedData()

I'm not totally convinced (I'm not totally unconvinced either, mind). 
1) it's likely we'll add columns that are not present many times as well, here, so we'll end
up sorting anyway; and
2) I think the best thing to do here is to optimise addAll() so that if the source is an ABSC
it uses the merge logic of sort() (which could be split out, and the columns being merged
could be parameterized), and then the addAtom() calls - which will always be unique, and in-order,
will always construct a sorted list we can efficiently merge. No binary search.

Not to say getting rid of binarySearch is still a good thing, but I think these optimisations
would be better for this spot. 

I think we should also look into optimising the selection of names from the source. We shouldn't
be constructing iterators, and shouldn't be performing binary search over the full range for
every column. But that's another ticket.

> Sort/reconcile cells in ArrayBackedSortedColumns only when an accessor is called
> --------------------------------------------------------------------------------
>                 Key: CASSANDRA-6662
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Aleksey Yeschenko
>            Assignee: Aleksey Yeschenko
>             Fix For: 2.1
> 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

View raw message