You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2015/02/13 11:12:43 UTC
[1/5] cassandra git commit: Fix memory leak in SSTableSimple*Writer
and SSTableReader.validate()
Repository: cassandra
Updated Branches:
refs/heads/cassandra-2.1 056f627e9 -> d6200a801
refs/heads/trunk 3bb4c3033 -> 99739ee3d
Fix memory leak in SSTableSimple*Writer and SSTableReader.validate()
patch by benedict; reviewed by marcus for CASSANDRA-8748
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c14a7d51
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c14a7d51
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c14a7d51
Branch: refs/heads/cassandra-2.1
Commit: c14a7d51e601b40cd0be03576dfcb9dba5a0abe9
Parents: a72869c
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Fri Feb 13 10:10:02 2015 +0000
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Fri Feb 13 10:10:02 2015 +0000
----------------------------------------------------------------------
CHANGES.txt | 1 +
src/java/org/apache/cassandra/io/sstable/SSTableReader.java | 3 +++
.../cassandra/io/sstable/SSTableSimpleUnsortedWriter.java | 2 +-
.../apache/cassandra/io/sstable/SSTableSimpleWriter.java | 2 +-
src/java/org/apache/cassandra/io/sstable/SSTableWriter.java | 9 ++++++++-
5 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c14a7d51/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d2ecccc..096e630 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.0.13:
+ * Fix memory leak in SSTableSimple*Writer and SSTableReader.validate() (CASSANDRA-8748)
* Throw OOM if allocating memory fails to return a valid pointer (CASSANDRA-8726)
* Fix SSTableSimpleUnsortedWriter ConcurrentModificationException (CASSANDRA-8619)
* Round up time deltas lower than 1ms in BulkLoader (CASSANDRA-8645)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c14a7d51/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
index 803c7fa..15808e8 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
@@ -593,7 +593,10 @@ public class SSTableReader extends SSTable implements Closeable
private void validate()
{
if (this.first.compareTo(this.last) > 0)
+ {
+ releaseReference();
throw new IllegalStateException(String.format("SSTable first key %s > last key %s", this.first, this.last));
+ }
}
/** get the position in the index file to start scanning to find the given key (at most indexInterval keys away) */
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c14a7d51/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
index db03ea1..614ca7d 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
@@ -227,7 +227,7 @@ public class SSTableSimpleUnsortedWriter extends AbstractSSTableSimpleWriter
throw new AssertionError("Empty partition");
first = false;
}
- writer.close();
+ writer.close(true);
}
}
catch (Throwable e)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c14a7d51/src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java
index 9b584f0..bef78b3 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java
@@ -72,7 +72,7 @@ public class SSTableSimpleWriter extends AbstractSSTableSimpleWriter
{
if (currentKey != null)
writeRow(currentKey, columnFamily);
- writer.close();
+ writer.close(true);
}
catch (FSError e)
{
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c14a7d51/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java b/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
index 08e5527..300b0f3 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
@@ -363,11 +363,18 @@ public class SSTableWriter extends SSTable
return sstable;
}
- // Close the writer and return the descriptor to the new sstable and it's metadata
public Pair<Descriptor, SSTableMetadata> close()
{
+ return close(false);
+ }
+
+ // Close the writer and return the descriptor to the new sstable and it's metadata
+ public Pair<Descriptor, SSTableMetadata> close(boolean closeBf)
+ {
// index and filter
iwriter.close();
+ if (closeBf)
+ iwriter.bf.close();
// main data, close will truncate if necessary
dataFile.close();
// write sstable statistics
[3/5] cassandra git commit: Merge branch 'cassandra-2.0' into
cassandra-2.1
Posted by be...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1
Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/io/sstable/SSTableReader.java
src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d6200a80
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d6200a80
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d6200a80
Branch: refs/heads/trunk
Commit: d6200a80164c4214f71508929dd529c4c6ec4ec3
Parents: 056f627 c14a7d5
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Fri Feb 13 10:12:15 2015 +0000
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Fri Feb 13 10:12:15 2015 +0000
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java | 2 +-
src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6200a80/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 81785e2,096e630..bca3dc8
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,119 -1,12 +1,120 @@@
-2.0.13:
+2.1.4
+ * 'nodetool info' prints exception against older node (CASSANDRA-8796)
+ * Ensure SSTableReader.last corresponds exactly with the file end (CASSANDRA-8750)
+ * Make SSTableWriter.openEarly more robust and obvious (CASSANDRA-8747)
+ * Enforce SSTableReader.first/last (CASSANDRA-8744)
+ * Cleanup SegmentedFile API (CASSANDRA-8749)
+ * Avoid overlap with early compaction replacement (CASSANDRA-8683)
+ * Safer Resource Management++ (CASSANDRA-8707)
+ * Write partition size estimates into a system table (CASSANDRA-7688)
+ * cqlsh: Fix keys() and full() collection indexes in DESCRIBE output
+ (CASSANDRA-8154)
+Merged from 2.0:
+ * Fix some multi-column relations with indexes on some clustering
+ columns (CASSANDRA-8275)
+ * Fix memory leak in SSTableSimple*Writer and SSTableReader.validate() (CASSANDRA-8748)
* Throw OOM if allocating memory fails to return a valid pointer (CASSANDRA-8726)
* Fix SSTableSimpleUnsortedWriter ConcurrentModificationException (CASSANDRA-8619)
- * Round up time deltas lower than 1ms in BulkLoader (CASSANDRA-8645)
- * Add batch remove iterator to ABSC (CASSANDRA-8414, 8666)
-2.0.12:
+2.1.3
+ * Fix HSHA/offheap_objects corruption (CASSANDRA-8719)
+ * Upgrade libthrift to 0.9.2 (CASSANDRA-8685)
+ * Don't use the shared ref in sstableloader (CASSANDRA-8704)
+ * Purge internal prepared statements if related tables or
+ keyspaces are dropped (CASSANDRA-8693)
+ * (cqlsh) Handle unicode BOM at start of files (CASSANDRA-8638)
+ * Stop compactions before exiting offline tools (CASSANDRA-8623)
+ * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
+ * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
+ * Safer Resource Management (CASSANDRA-7705)
+ * Make sure we compact highly overlapping cold sstables with
+ STCS (CASSANDRA-8635)
+ * rpc_interface and listen_interface generate NPE on startup when specified
+ interface doesn't exist (CASSANDRA-8677)
+ * Fix ArrayIndexOutOfBoundsException in nodetool cfhistograms (CASSANDRA-8514)
+ * Switch from yammer metrics for nodetool cf/proxy histograms (CASSANDRA-8662)
+ * Make sure we don't add tmplink files to the compaction
+ strategy (CASSANDRA-8580)
+ * (cqlsh) Handle maps with blob keys (CASSANDRA-8372)
+ * (cqlsh) Handle DynamicCompositeType schemas correctly (CASSANDRA-8563)
+ * Duplicate rows returned when in clause has repeated values (CASSANDRA-6706)
+ * Add tooling to detect hot partitions (CASSANDRA-7974)
+ * Fix cassandra-stress user-mode truncation of partition generation (CASSANDRA-8608)
+ * Only stream from unrepaired sstables during inc repair (CASSANDRA-8267)
+ * Don't allow starting multiple inc repairs on the same sstables (CASSANDRA-8316)
+ * Invalidate prepared BATCH statements when related tables
+ or keyspaces are dropped (CASSANDRA-8652)
+ * Fix missing results in secondary index queries on collections
+ with ALLOW FILTERING (CASSANDRA-8421)
+ * Expose EstimatedHistogram metrics for range slices (CASSANDRA-8627)
+ * (cqlsh) Escape clqshrc passwords properly (CASSANDRA-8618)
+ * Fix NPE when passing wrong argument in ALTER TABLE statement (CASSANDRA-8355)
+ * Pig: Refactor and deprecate CqlStorage (CASSANDRA-8599)
+ * Don't reuse the same cleanup strategy for all sstables (CASSANDRA-8537)
+ * Fix case-sensitivity of index name on CREATE and DROP INDEX
+ statements (CASSANDRA-8365)
+ * Better detection/logging for corruption in compressed sstables (CASSANDRA-8192)
+ * Use the correct repairedAt value when closing writer (CASSANDRA-8570)
+ * (cqlsh) Handle a schema mismatch being detected on startup (CASSANDRA-8512)
+ * Properly calculate expected write size during compaction (CASSANDRA-8532)
+ * Invalidate affected prepared statements when a table's columns
+ are altered (CASSANDRA-7910)
+ * Stress - user defined writes should populate sequentally (CASSANDRA-8524)
+ * Fix regression in SSTableRewriter causing some rows to become unreadable
+ during compaction (CASSANDRA-8429)
+ * Run major compactions for repaired/unrepaired in parallel (CASSANDRA-8510)
+ * (cqlsh) Fix compression options in DESCRIBE TABLE output when compression
+ is disabled (CASSANDRA-8288)
+ * (cqlsh) Fix DESCRIBE output after keyspaces are altered (CASSANDRA-7623)
+ * Make sure we set lastCompactedKey correctly (CASSANDRA-8463)
+ * (cqlsh) Fix output of CONSISTENCY command (CASSANDRA-8507)
+ * (cqlsh) Fixed the handling of LIST statements (CASSANDRA-8370)
+ * Make sstablescrub check leveled manifest again (CASSANDRA-8432)
+ * Check first/last keys in sstable when giving out positions (CASSANDRA-8458)
+ * Disable mmap on Windows (CASSANDRA-6993)
+ * Add missing ConsistencyLevels to cassandra-stress (CASSANDRA-8253)
+ * Add auth support to cassandra-stress (CASSANDRA-7985)
+ * Fix ArrayIndexOutOfBoundsException when generating error message
+ for some CQL syntax errors (CASSANDRA-8455)
+ * Scale memtable slab allocation logarithmically (CASSANDRA-7882)
+ * cassandra-stress simultaneous inserts over same seed (CASSANDRA-7964)
+ * Reduce cassandra-stress sampling memory requirements (CASSANDRA-7926)
+ * Ensure memtable flush cannot expire commit log entries from its future (CASSANDRA-8383)
+ * Make read "defrag" async to reclaim memtables (CASSANDRA-8459)
+ * Remove tmplink files for offline compactions (CASSANDRA-8321)
+ * Reduce maxHintsInProgress (CASSANDRA-8415)
+ * BTree updates may call provided update function twice (CASSANDRA-8018)
+ * Release sstable references after anticompaction (CASSANDRA-8386)
+ * Handle abort() in SSTableRewriter properly (CASSANDRA-8320)
+ * Fix high size calculations for prepared statements (CASSANDRA-8231)
+ * Centralize shared executors (CASSANDRA-8055)
+ * Fix filtering for CONTAINS (KEY) relations on frozen collection
+ clustering columns when the query is restricted to a single
+ partition (CASSANDRA-8203)
+ * Do more aggressive entire-sstable TTL expiry checks (CASSANDRA-8243)
+ * Add more log info if readMeter is null (CASSANDRA-8238)
+ * add check of the system wall clock time at startup (CASSANDRA-8305)
+ * Support for frozen collections (CASSANDRA-7859)
+ * Fix overflow on histogram computation (CASSANDRA-8028)
+ * Have paxos reuse the timestamp generation of normal queries (CASSANDRA-7801)
+ * Fix incremental repair not remove parent session on remote (CASSANDRA-8291)
+ * Improve JBOD disk utilization (CASSANDRA-7386)
+ * Log failed host when preparing incremental repair (CASSANDRA-8228)
+ * Force config client mode in CQLSSTableWriter (CASSANDRA-8281)
+ * Fix sstableupgrade throws exception (CASSANDRA-8688)
+ * Fix hang when repairing empty keyspace (CASSANDRA-8694)
+Merged from 2.0:
+ * Fix IllegalArgumentException in dynamic snitch (CASSANDRA-8448)
+ * Add support for UPDATE ... IF EXISTS (CASSANDRA-8610)
+ * Fix reversal of list prepends (CASSANDRA-8733)
+ * Prevent non-zero default_time_to_live on tables with counters
+ (CASSANDRA-8678)
+ * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException
+ (CASSANDRA-8619)
+ * Round up time deltas lower than 1ms in BulkLoader (CASSANDRA-8645)
+ * Add batch remove iterator to ABSC (CASSANDRA-8414, 8666)
+ * Fix isClientMode check in Keyspace (CASSANDRA-8687)
* Use more efficient slice size for querying internal secondary
index tables (CASSANDRA-8550)
* Fix potentially returning deleted rows with range tombstone (CASSANDRA-8558)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6200a80/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6200a80/src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java
----------------------------------------------------------------------
[5/5] cassandra git commit: Merge branch 'cassandra-2.1' into trunk
Posted by be...@apache.org.
Merge branch 'cassandra-2.1' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/99739ee3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/99739ee3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/99739ee3
Branch: refs/heads/trunk
Commit: 99739ee3d1a3a2886d8033db3484a98d243853c7
Parents: 3bb4c30 d6200a8
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Fri Feb 13 10:12:24 2015 +0000
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Fri Feb 13 10:12:24 2015 +0000
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java | 2 +-
src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99739ee3/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99739ee3/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
index 2e77a19,38ba76a..250b5dc
--- a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
@@@ -228,19 -227,16 +228,19 @@@ public class SSTableSimpleUnsortedWrite
throw new AssertionError("Empty partition");
first = false;
}
- writer.close();
+ writer.close(true);
}
+ catch (Throwable e)
+ {
+ JVMStabilityInspector.inspectThrowable(e);
+ if (writer != null)
+ writer.abort();
+ // Keep only the first exception
+ if (exception == null)
+ exception = e;
+ }
}
- catch (Throwable e)
- {
- JVMStabilityInspector.inspectThrowable(e);
- if (writer != null)
- writer.abort();
- exception = e;
- }
+
}
}
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99739ee3/src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java
----------------------------------------------------------------------
[4/5] cassandra git commit: Merge branch 'cassandra-2.0' into
cassandra-2.1
Posted by be...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1
Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/io/sstable/SSTableReader.java
src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d6200a80
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d6200a80
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d6200a80
Branch: refs/heads/cassandra-2.1
Commit: d6200a80164c4214f71508929dd529c4c6ec4ec3
Parents: 056f627 c14a7d5
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Fri Feb 13 10:12:15 2015 +0000
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Fri Feb 13 10:12:15 2015 +0000
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java | 2 +-
src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6200a80/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 81785e2,096e630..bca3dc8
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,119 -1,12 +1,120 @@@
-2.0.13:
+2.1.4
+ * 'nodetool info' prints exception against older node (CASSANDRA-8796)
+ * Ensure SSTableReader.last corresponds exactly with the file end (CASSANDRA-8750)
+ * Make SSTableWriter.openEarly more robust and obvious (CASSANDRA-8747)
+ * Enforce SSTableReader.first/last (CASSANDRA-8744)
+ * Cleanup SegmentedFile API (CASSANDRA-8749)
+ * Avoid overlap with early compaction replacement (CASSANDRA-8683)
+ * Safer Resource Management++ (CASSANDRA-8707)
+ * Write partition size estimates into a system table (CASSANDRA-7688)
+ * cqlsh: Fix keys() and full() collection indexes in DESCRIBE output
+ (CASSANDRA-8154)
+Merged from 2.0:
+ * Fix some multi-column relations with indexes on some clustering
+ columns (CASSANDRA-8275)
+ * Fix memory leak in SSTableSimple*Writer and SSTableReader.validate() (CASSANDRA-8748)
* Throw OOM if allocating memory fails to return a valid pointer (CASSANDRA-8726)
* Fix SSTableSimpleUnsortedWriter ConcurrentModificationException (CASSANDRA-8619)
- * Round up time deltas lower than 1ms in BulkLoader (CASSANDRA-8645)
- * Add batch remove iterator to ABSC (CASSANDRA-8414, 8666)
-2.0.12:
+2.1.3
+ * Fix HSHA/offheap_objects corruption (CASSANDRA-8719)
+ * Upgrade libthrift to 0.9.2 (CASSANDRA-8685)
+ * Don't use the shared ref in sstableloader (CASSANDRA-8704)
+ * Purge internal prepared statements if related tables or
+ keyspaces are dropped (CASSANDRA-8693)
+ * (cqlsh) Handle unicode BOM at start of files (CASSANDRA-8638)
+ * Stop compactions before exiting offline tools (CASSANDRA-8623)
+ * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
+ * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
+ * Safer Resource Management (CASSANDRA-7705)
+ * Make sure we compact highly overlapping cold sstables with
+ STCS (CASSANDRA-8635)
+ * rpc_interface and listen_interface generate NPE on startup when specified
+ interface doesn't exist (CASSANDRA-8677)
+ * Fix ArrayIndexOutOfBoundsException in nodetool cfhistograms (CASSANDRA-8514)
+ * Switch from yammer metrics for nodetool cf/proxy histograms (CASSANDRA-8662)
+ * Make sure we don't add tmplink files to the compaction
+ strategy (CASSANDRA-8580)
+ * (cqlsh) Handle maps with blob keys (CASSANDRA-8372)
+ * (cqlsh) Handle DynamicCompositeType schemas correctly (CASSANDRA-8563)
+ * Duplicate rows returned when in clause has repeated values (CASSANDRA-6706)
+ * Add tooling to detect hot partitions (CASSANDRA-7974)
+ * Fix cassandra-stress user-mode truncation of partition generation (CASSANDRA-8608)
+ * Only stream from unrepaired sstables during inc repair (CASSANDRA-8267)
+ * Don't allow starting multiple inc repairs on the same sstables (CASSANDRA-8316)
+ * Invalidate prepared BATCH statements when related tables
+ or keyspaces are dropped (CASSANDRA-8652)
+ * Fix missing results in secondary index queries on collections
+ with ALLOW FILTERING (CASSANDRA-8421)
+ * Expose EstimatedHistogram metrics for range slices (CASSANDRA-8627)
+ * (cqlsh) Escape clqshrc passwords properly (CASSANDRA-8618)
+ * Fix NPE when passing wrong argument in ALTER TABLE statement (CASSANDRA-8355)
+ * Pig: Refactor and deprecate CqlStorage (CASSANDRA-8599)
+ * Don't reuse the same cleanup strategy for all sstables (CASSANDRA-8537)
+ * Fix case-sensitivity of index name on CREATE and DROP INDEX
+ statements (CASSANDRA-8365)
+ * Better detection/logging for corruption in compressed sstables (CASSANDRA-8192)
+ * Use the correct repairedAt value when closing writer (CASSANDRA-8570)
+ * (cqlsh) Handle a schema mismatch being detected on startup (CASSANDRA-8512)
+ * Properly calculate expected write size during compaction (CASSANDRA-8532)
+ * Invalidate affected prepared statements when a table's columns
+ are altered (CASSANDRA-7910)
+ * Stress - user defined writes should populate sequentally (CASSANDRA-8524)
+ * Fix regression in SSTableRewriter causing some rows to become unreadable
+ during compaction (CASSANDRA-8429)
+ * Run major compactions for repaired/unrepaired in parallel (CASSANDRA-8510)
+ * (cqlsh) Fix compression options in DESCRIBE TABLE output when compression
+ is disabled (CASSANDRA-8288)
+ * (cqlsh) Fix DESCRIBE output after keyspaces are altered (CASSANDRA-7623)
+ * Make sure we set lastCompactedKey correctly (CASSANDRA-8463)
+ * (cqlsh) Fix output of CONSISTENCY command (CASSANDRA-8507)
+ * (cqlsh) Fixed the handling of LIST statements (CASSANDRA-8370)
+ * Make sstablescrub check leveled manifest again (CASSANDRA-8432)
+ * Check first/last keys in sstable when giving out positions (CASSANDRA-8458)
+ * Disable mmap on Windows (CASSANDRA-6993)
+ * Add missing ConsistencyLevels to cassandra-stress (CASSANDRA-8253)
+ * Add auth support to cassandra-stress (CASSANDRA-7985)
+ * Fix ArrayIndexOutOfBoundsException when generating error message
+ for some CQL syntax errors (CASSANDRA-8455)
+ * Scale memtable slab allocation logarithmically (CASSANDRA-7882)
+ * cassandra-stress simultaneous inserts over same seed (CASSANDRA-7964)
+ * Reduce cassandra-stress sampling memory requirements (CASSANDRA-7926)
+ * Ensure memtable flush cannot expire commit log entries from its future (CASSANDRA-8383)
+ * Make read "defrag" async to reclaim memtables (CASSANDRA-8459)
+ * Remove tmplink files for offline compactions (CASSANDRA-8321)
+ * Reduce maxHintsInProgress (CASSANDRA-8415)
+ * BTree updates may call provided update function twice (CASSANDRA-8018)
+ * Release sstable references after anticompaction (CASSANDRA-8386)
+ * Handle abort() in SSTableRewriter properly (CASSANDRA-8320)
+ * Fix high size calculations for prepared statements (CASSANDRA-8231)
+ * Centralize shared executors (CASSANDRA-8055)
+ * Fix filtering for CONTAINS (KEY) relations on frozen collection
+ clustering columns when the query is restricted to a single
+ partition (CASSANDRA-8203)
+ * Do more aggressive entire-sstable TTL expiry checks (CASSANDRA-8243)
+ * Add more log info if readMeter is null (CASSANDRA-8238)
+ * add check of the system wall clock time at startup (CASSANDRA-8305)
+ * Support for frozen collections (CASSANDRA-7859)
+ * Fix overflow on histogram computation (CASSANDRA-8028)
+ * Have paxos reuse the timestamp generation of normal queries (CASSANDRA-7801)
+ * Fix incremental repair not remove parent session on remote (CASSANDRA-8291)
+ * Improve JBOD disk utilization (CASSANDRA-7386)
+ * Log failed host when preparing incremental repair (CASSANDRA-8228)
+ * Force config client mode in CQLSSTableWriter (CASSANDRA-8281)
+ * Fix sstableupgrade throws exception (CASSANDRA-8688)
+ * Fix hang when repairing empty keyspace (CASSANDRA-8694)
+Merged from 2.0:
+ * Fix IllegalArgumentException in dynamic snitch (CASSANDRA-8448)
+ * Add support for UPDATE ... IF EXISTS (CASSANDRA-8610)
+ * Fix reversal of list prepends (CASSANDRA-8733)
+ * Prevent non-zero default_time_to_live on tables with counters
+ (CASSANDRA-8678)
+ * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException
+ (CASSANDRA-8619)
+ * Round up time deltas lower than 1ms in BulkLoader (CASSANDRA-8645)
+ * Add batch remove iterator to ABSC (CASSANDRA-8414, 8666)
+ * Fix isClientMode check in Keyspace (CASSANDRA-8687)
* Use more efficient slice size for querying internal secondary
index tables (CASSANDRA-8550)
* Fix potentially returning deleted rows with range tombstone (CASSANDRA-8558)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6200a80/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6200a80/src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java
----------------------------------------------------------------------
[2/5] cassandra git commit: Fix memory leak in SSTableSimple*Writer
and SSTableReader.validate()
Posted by be...@apache.org.
Fix memory leak in SSTableSimple*Writer and SSTableReader.validate()
patch by benedict; reviewed by marcus for CASSANDRA-8748
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c14a7d51
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c14a7d51
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c14a7d51
Branch: refs/heads/trunk
Commit: c14a7d51e601b40cd0be03576dfcb9dba5a0abe9
Parents: a72869c
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Fri Feb 13 10:10:02 2015 +0000
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Fri Feb 13 10:10:02 2015 +0000
----------------------------------------------------------------------
CHANGES.txt | 1 +
src/java/org/apache/cassandra/io/sstable/SSTableReader.java | 3 +++
.../cassandra/io/sstable/SSTableSimpleUnsortedWriter.java | 2 +-
.../apache/cassandra/io/sstable/SSTableSimpleWriter.java | 2 +-
src/java/org/apache/cassandra/io/sstable/SSTableWriter.java | 9 ++++++++-
5 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c14a7d51/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d2ecccc..096e630 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.0.13:
+ * Fix memory leak in SSTableSimple*Writer and SSTableReader.validate() (CASSANDRA-8748)
* Throw OOM if allocating memory fails to return a valid pointer (CASSANDRA-8726)
* Fix SSTableSimpleUnsortedWriter ConcurrentModificationException (CASSANDRA-8619)
* Round up time deltas lower than 1ms in BulkLoader (CASSANDRA-8645)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c14a7d51/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
index 803c7fa..15808e8 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
@@ -593,7 +593,10 @@ public class SSTableReader extends SSTable implements Closeable
private void validate()
{
if (this.first.compareTo(this.last) > 0)
+ {
+ releaseReference();
throw new IllegalStateException(String.format("SSTable first key %s > last key %s", this.first, this.last));
+ }
}
/** get the position in the index file to start scanning to find the given key (at most indexInterval keys away) */
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c14a7d51/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
index db03ea1..614ca7d 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
@@ -227,7 +227,7 @@ public class SSTableSimpleUnsortedWriter extends AbstractSSTableSimpleWriter
throw new AssertionError("Empty partition");
first = false;
}
- writer.close();
+ writer.close(true);
}
}
catch (Throwable e)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c14a7d51/src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java
index 9b584f0..bef78b3 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java
@@ -72,7 +72,7 @@ public class SSTableSimpleWriter extends AbstractSSTableSimpleWriter
{
if (currentKey != null)
writeRow(currentKey, columnFamily);
- writer.close();
+ writer.close(true);
}
catch (FSError e)
{
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c14a7d51/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java b/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
index 08e5527..300b0f3 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
@@ -363,11 +363,18 @@ public class SSTableWriter extends SSTable
return sstable;
}
- // Close the writer and return the descriptor to the new sstable and it's metadata
public Pair<Descriptor, SSTableMetadata> close()
{
+ return close(false);
+ }
+
+ // Close the writer and return the descriptor to the new sstable and it's metadata
+ public Pair<Descriptor, SSTableMetadata> close(boolean closeBf)
+ {
// index and filter
iwriter.close();
+ if (closeBf)
+ iwriter.bf.close();
// main data, close will truncate if necessary
dataFile.close();
// write sstable statistics