[ 
https://issues.apache.org/jira/browse/CASSANDRA-16986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksandr Sorokoumov updated CASSANDRA-16986:
---------------------------------------------
    Test and Documentation Plan: I added a test that ensures that a dropped 
table does not leave dirty intervals in the active segments.
                         Status: Patch Available  (was: Open)

This patch removes {{CommitLog.instance#forceRecycleAllSegments}} from the 
{{DROP TABLE}} path. In addition, 
{{AbstractCommitLogSegmentManager#forceRecycleAll}} no longer explicitly cleans 
up the segment intervals for the dropping table.



||Branch||CI||
|[trunk|https://github.com/apache/cassandra/compare/trunk...Gerrrr:CASSANDRA-16986?expand=1]
 
|[j8|https://app.circleci.com/pipelines/github/Gerrrr/cassandra/204/workflows/1125c27e-392f-49b7-9488-e702d5afbc84]
 
[j11|https://app.circleci.com/pipelines/github/Gerrrr/cassandra/204/workflows/a55543ad-e4ca-469a-8037-79dd508ba606]|

 

> DROP Table should not recycle active CommitLog segments
> -------------------------------------------------------
>
>                 Key: CASSANDRA-16986
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16986
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local/Commit Log
>            Reporter: Aleksandr Sorokoumov
>            Assignee: Aleksandr Sorokoumov
>            Priority: Normal
>             Fix For: 4.x
>
>
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to