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

Aleksey Yeschenko commented on CASSANDRA-8414:
----------------------------------------------

All right, committed to both 2.0 and 2.1. I fixed some nits in both - added a 
missing license header, made everything conform our code style, and made some 
renames for consistency with the other ABSC iterators we have (esp. in 2.1 impl)

Also, in 2.1, made AtomicBTreeColumns#getBatchRemoveIterator() throw UOE 
instead of adding a dummy implementation to CF.

The 2.1 version had three bugs in it that I fixed on commit:
1. maybeSortCells() wasn't being called before returning the iterator
2. at the end of commit, only 'size' was updated, but 'sortedSize' was not
3. unlike the 2.0 version, the 2.1 version was not nullifying the trimmed cells 
at the end of the array

> Avoid loops over array backed iterators that call iter.remove()
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-8414
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8414
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Richard Low
>            Assignee: Jimmy MÃ¥rdell
>              Labels: performance
>             Fix For: 2.1.3, 2.0.13
>
>         Attachments: cassandra-2.0-8414-1.txt, cassandra-2.0-8414-2.txt, 
> cassandra-2.0-8414-3.txt, cassandra-2.0-8414-4.txt, cassandra-2.0-8414-5.txt, 
> cassandra-2.1-8414-5.txt, cassandra-2.1-8414-6.txt
>
>
> I noticed from sampling that sometimes compaction spends almost all of its 
> time in iter.remove() in ColumnFamilyStore.removeDeletedStandard. It turns 
> out that the cf object is using ArrayBackedSortedColumns, so deletes are from 
> an ArrayList. If the majority of your columns are GCable tombstones then this 
> is O(n^2). The data structure should be changed or a copy made to avoid this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to