From 35446dca270ba570c5e523fd80ea5c223dfbeccc Mon Sep 17 00:00:00 2001 From: Aleksandr Sorokoumov Date: Mon, 27 Sep 2021 15:33:32 +0200 Subject: [PATCH] Elaborate on why we need to recycle CL segments when dropping tables patch by Aleksandr Sorokoumov; reviewed by Caleb Rackliffe and Benjamin Lerer for CASSANDRA-16986 --- .../apache/cassandra/db/commitlog/CommitLogSegmentManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java b/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java index c24aa12199..291616d250 100644 --- a/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java +++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManager.java @@ -291,7 +291,8 @@ public class CommitLogSegmentManager * Switch to a new segment, regardless of how much is left in the current one. * * Flushes any dirty CFs for this segment and any older segments, and then recycles - * the segments + * the segments. This is necessary to avoid resurrecting data during replay if a user + * creates a new table with the same name and ID. See CASSANDRA-16986 for more details. */ void forceRecycleAll(Iterable droppedCfs) {