cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jimmy Mårdell (JIRA) <>
Subject [jira] [Commented] (CASSANDRA-8414) Avoid loops over array backed iterators that call iter.remove()
Date Tue, 13 Jan 2015 10:23:35 GMT


Jimmy Mårdell commented on CASSANDRA-8414:

Right, of course. v6 attached.

> Avoid loops over array backed iterators that call iter.remove()
> ---------------------------------------------------------------
>                 Key: CASSANDRA-8414
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Richard Low
>            Assignee: Jimmy Mårdell
>              Labels: performance
>             Fix For: 2.1.3
>         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

View raw message