On Fri, Nov 1, 2013 at 12:47 PM, Jiri Horky <horky@avast.com> wrote:
since we upgraded half of our Cassandra cluster to 2.0.0 and we use LCS,
we hit CASSANDRA-6284 bug.

1) Why upgrade a cluster to 2.0.0? Hopefully not a production cluster? [1]

2) CASSANDRA-6284 is ouch, thx for filing and patching!

3) What do you mean by "upgraded half of our Cassandra cluster"? That is Not Supported and also Not Advised... for example, before the streaming change in 2.x line, a cluster in such a state may be unable to have nodes added, removed or replaced.

So the question. What is the best way to recompact all the sstables so
the data in one sstables within a level would contain more or less the
right portion of the data
... 
Based on documentation, I can only think of switching to SizeTiered
compaction, doing major compaction and then switching back to LCS.

That will work, though be aware of  the implication of CASSANDRA-6092 [2]. Briefly, if the CF in question is not receiving write load, you will be unable to promote your One Big SSTable from L0 to L1. In that case, you might want to consider running sstable_split (and then restarting the node) in order to split your One Big SSTable into two or more smaller ones.

=Rob

[1] https://engineering.eventbrite.com/what-version-of-cassandra-should-i-run/
[2] https://issues.apache.org/jira/browse/CASSANDRA-6092