diff --git a/CHANGES.txt b/CHANGES.txt index 6609b05722..452dc9bcf1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.15 + * enable segement creation before recovering commitlogs (CASSANDRA-13587) * Fix AssertionError in short read protection (CASSANDRA-13747) * Don't skip corrupted sstables on startup (CASSANDRA-13620) * Fix the merging of cells with different user type versions (CASSANDRA-13776) diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLog.java b/src/java/org/apache/cassandra/db/commitlog/CommitLog.java index d167735fcf..40040edfac 100644 --- a/src/java/org/apache/cassandra/db/commitlog/CommitLog.java +++ b/src/java/org/apache/cassandra/db/commitlog/CommitLog.java @@ -150,6 +150,7 @@ public class CommitLog implements CommitLogMBean File[] files = new File(DatabaseDescriptor.getCommitLogLocation()).listFiles(unmanagedFilesFilter); int replayed = 0; + allocator.enableReserveSegmentCreation(); if (files.length == 0) { logger.info("No commitlog files found; skipping replay"); @@ -165,7 +166,6 @@ public class CommitLog implements CommitLogMBean allocator.recycleSegment(f); } - allocator.enableReserveSegmentCreation(); return replayed; }