cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/3] git commit: close segments in resetUnsafe patch by Ala' Alkhaldi; reviewed by Joshua McKenzie for CASSANDRA-7334
Date Wed, 04 Jun 2014 19:30:03 GMT
close segments in resetUnsafe
patch by Ala' Alkhaldi; reviewed by Joshua McKenzie for CASSANDRA-7334


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/285c369a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/285c369a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/285c369a

Branch: refs/heads/trunk
Commit: 285c369ac7910d24b7260a3d96a67de9257cb9bd
Parents: 8e85f0c
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Jun 4 14:29:48 2014 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Jun 4 14:29:48 2014 -0500

----------------------------------------------------------------------
 .../apache/cassandra/db/commitlog/CommitLogSegmentManager.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/285c369a/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java b/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java
index 5802e8a..117b9d1 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java
@@ -484,8 +484,14 @@ public class CommitLogSegmentManager
         while (!segmentManagementTasks.isEmpty())
             Thread.yield();
 
+        for (CommitLogSegment segment : activeSegments)
+            segment.close();
         activeSegments.clear();
+
+        for (CommitLogSegment segment : availableSegments)
+            segment.close();
         availableSegments.clear();
+
         allocatingFrom = null;
     }
 


Mime
View raw message