You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2013/11/20 17:52:22 UTC
[2/3] git commit: Fix FD leak on slice read path patch by Graham
Sanderson and jbellis;
reviewed by slebresne and tested by mshuler for CASSANDRA-6275
Fix FD leak on slice read path
patch by Graham Sanderson and jbellis; reviewed by slebresne and tested by mshuler for CASSANDRA-6275
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fcb2c65f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fcb2c65f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fcb2c65f
Branch: refs/heads/trunk
Commit: fcb2c65f016a2590d046883c2d1ea65a9a04b0a5
Parents: 1bad5ed
Author: Jonathan Ellis <jb...@apache.org>
Authored: Wed Nov 20 10:51:49 2013 -0600
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Wed Nov 20 10:51:49 2013 -0600
----------------------------------------------------------------------
CHANGES.txt | 1 +
src/java/org/apache/cassandra/db/CollationController.java | 9 +++++----
2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/fcb2c65f/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7b2db56..43538b7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.0.3
+ * Fix FD leak on slice read path (CASSANDRA-6275)
* Cancel read meter task when closing SSTR (CASSANDRA-6358)
* free off-heap IndexSummary during bulk (CASSANDRA-6359)
* Recover from IOException in accept() thread (CASSANDRA-6349)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/fcb2c65f/src/java/org/apache/cassandra/db/CollationController.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/CollationController.java b/src/java/org/apache/cassandra/db/CollationController.java
index 758d523..33d77ee 100644
--- a/src/java/org/apache/cassandra/db/CollationController.java
+++ b/src/java/org/apache/cassandra/db/CollationController.java
@@ -271,18 +271,19 @@ public class CollationController
sstable.incrementReadCount();
OnDiskAtomIterator iter = filter.getSSTableColumnIterator(sstable);
- if (iter.getColumnFamily() == null)
- continue;
-
ColumnFamily cf = iter.getColumnFamily();
// we are only interested in row-level tombstones here, and only if markedForDeleteAt is larger than minTimestamp
- if (cf.deletionInfo().getTopLevelDeletion().markedForDeleteAt > minTimestamp)
+ if (cf != null && cf.deletionInfo().getTopLevelDeletion().markedForDeleteAt > minTimestamp)
{
includedDueToTombstones++;
iterators.add(iter);
returnCF.delete(cf.deletionInfo().getTopLevelDeletion());
sstablesIterated++;
}
+ else
+ {
+ FileUtils.closeQuietly(iter);
+ }
}
}
if (Tracing.isTracing())