cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-7107) General minor tidying of CollationController path
Date Sat, 03 May 2014 23:50:16 GMT


Aleksey Yeschenko commented on CASSANDRA-7107:

Overall LGTM, some very welcome cleanup. Nice catch with the empty check in CollationController#collectTimeOrderedData(),

Squashed commit #1 and #3 together and added to extra commits with suggested changes, pushed

The second original commit is not included b/c I'm very uncomfortable with leaving a ColumnFamily#append()
method around - it's going to be abused by some innocent sole, and there will be hard to debug
suffering as a result. Inlined it into a new CF#maybeAppendColumn() method instead, that's
less likely to be called by mistake (see the last commit).

The second commit has a bugfix, some improvements, nits fixed, some extra cleanup and prettiness:
- discovered only one bug - ABSC.CellCollection#size() was not calling maybeSortCells() -
fixed in the commit #2
- refactored ABSC#slice() and ABTC#slice() for obviousness
- made the second binary search in ABSC#slice() use the updated lowerBound, reducing the range
to search
- in CollationController#collectAllData(), in the memtable loop, using Iterables#transform()
instead of copying the cells into a temporary ArrayList, to potentially reduce the amount
of localCopy()-ing (esp. for low query LIMITs)
- rolled back MergeIterator#getSimple() - here, I don't think that 1-1 duplication of MergeIterator#get()
is worth removing a little bit of indirection, sorry. Hope you don't have a strong opinion
here, because I, weirdly, do.

> General minor tidying of CollationController path
> -------------------------------------------------
>                 Key: CASSANDRA-7107
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: Benedict
>            Priority: Minor
>             Fix For: 2.1 rc1
> There is a lot of unnecessary boiler plate when grabbing an iterator from an in-memory
column family. This patch:
> * Removes FakeCellName
> * Avoids wrapping a non-OnDiskAtomIterator as an OnDiskAtomIterator except when the wrapping
is useful
> * Removes ColumnSlice.NavigableSetIterator and creates a simpler more direct equivalent
> * Does not construct a SliceIterator in either ABSC or ABTC if only one slice is requested
(just returns that slice as an Iterator)
> * Does not construct multiple list indirections in ABSC when constructing a slice
> * Shares forward/reverse iterators in ABSC between slices and full-iteration
> * Avoids O(N) comparisons during collation of results into an ABSC, by using the knowledge
that all columns are provided in insertion order from a merge iterator

This message was sent by Atlassian JIRA

View raw message