Details
-
Improvement
-
Status: Resolved
-
Low
-
Resolution: Fixed
-
3.0.26, 3.11.12, 4.0.2, 4.1-alpha1, 4.1
-
None
-
Code Clarity
-
Normal
-
All
-
None
-
Description
Right now, DROP TABLE recycles all active CL segments and explicitly marks intervals as clean for all dropping tables. I believe that this is not necessary.
Recycling of CL segments was introduced in CASSANDRA-3578. Back then, it was necessary to recycle all active segments because:
1. CommitLog reused old segments after they were clean. This is no longer the case, I believe, since CASSANDRA-6809.
2. CommitLog segments must have been closed and recycled on DROP TABLE to avoid resurrecting data if a table with the same name is created. This was an issue because tables didn't have unique ids yet (CASSANDRA-5202).
Given that DROP TABLE triggers flush, which in turn cleans CL intervals in Keyspace#unloadCF, I think that we can avoid the call to forceRecycleAll there.