close segments in resetUnsafe

patch by Ala' Alkhaldi; reviewed by Joshua McKenzie for CASSANDRA-7334
This commit is contained in:
Jonathan Ellis 2014-06-04 14:29:48 -05:00
parent 8e85f0c32f
commit 285c369ac7
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}