Skip to content
Browse files

Merge branch 'cassandra-1.2' into trunk

  • Loading branch information...
2 parents 77fb208 + 9fdccd7 commit 0febf44d5246fd7dce6ac9e47193dd4a4bd18ad8 @jbellis jbellis committed Dec 18, 2012
View
1 CHANGES.txt
@@ -25,6 +25,7 @@
* cqlsh: force CL.ONE for tracing and system.schema* queries (CASSANDRA-5070)
* Includes cassandra-shuffle in the debian package (CASSANDRA-5058)
Merged from 1.1:
+ * fix multithreaded compaction deadlock (CASSANDRA-4492)
* fix temporarily missing schema after upgrade from pre-1.1.5 (CASSANDRA-5061)
* Fix ALTER TABLE overriding compression options with defaults
(CASSANDRA-4996, CASSANDRA-5066)
View
15 conf/cassandra.yaml
@@ -432,15 +432,12 @@ in_memory_compaction_limit_in_mb: 64
# Uncomment to make compaction mono-threaded, the pre-0.8 default.
#concurrent_compactors: 1
-# multithreaded_compaction: false. When enabled, each compaction will
-# use up to one thread per core, plus one thread per sstable being
-# merged. This is usually only useful for SSD-based hardware:
-# otherwise, your concern is usually to get compaction to do LESS i/o
-# (see: compaction_throughput_mb_per_sec), not more.
-#
-# WARNING: this setting has caused compaction deadlocks for multiple
-# users (see CASSANDRA-4492). It is recommended to leave this off
-# unless you are prepared to help troubleshoot.
+# Multi-threaded compaction. When enabled, each compaction will use
+# up to one thread per core, plus one thread per sstable being merged.
+# This is usually only useful for SSD-based hardware: otherwise,
+# your concern is usually to get compaction to do LESS i/o (see:
+# compaction_throughput_mb_per_sec), not more.
+multithreaded_compaction: false
# Throttles compaction to the given total throughput across the entire
# system. The faster you insert data, the faster you need to compact in
View
3 src/java/org/apache/cassandra/db/compaction/AbstractCompactedRow.java
@@ -17,6 +17,7 @@
*/
package org.apache.cassandra.db.compaction;
+import java.io.Closeable;
import java.io.DataOutput;
import java.io.IOException;
import java.security.MessageDigest;
@@ -31,7 +32,7 @@
* and can write a compacted version of those rows to an output stream. It does
* NOT necessarily require creating a merged CF object in memory.
*/
-public abstract class AbstractCompactedRow
+public abstract class AbstractCompactedRow implements Closeable
{
public final DecoratedKey key;
View
3 src/java/org/apache/cassandra/db/compaction/CompactionTask.java
@@ -161,7 +161,10 @@ protected void runWith(File dataDirectory) throws Exception
AbstractCompactedRow row = nni.next();
if (row.isEmpty())
+ {
+ row.close();
continue;
+ }
RowIndexEntry indexEntry = writer.append(row);
totalkeysWritten++;
View
2 src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
@@ -196,7 +196,7 @@ public ColumnStats columnStats()
return columnStats;
}
- private void close()
+ public void close()
{
for (OnDiskAtomIterator row : rows)
{
View
2 src/java/org/apache/cassandra/db/compaction/PrecompactedRow.java
@@ -196,4 +196,6 @@ public ColumnIndex index()
{
return columnIndex;
}
+
+ public void close() { }
}

0 comments on commit 0febf44

Please sign in to comment.
Something went wrong with that request. Please try again.