[ 
https://issues.apache.org/jira/browse/CASSANDRA-8124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14312565#comment-14312565
 ] 

Benedict commented on CASSANDRA-8124:
-------------------------------------

I'm confused. Isn't this what CFS.removeUnfinishedCompactionLeftovers is for? 
Doesn't this still leave a window for it to fail, otherwise, since the creatoin 
of the non-temp files and swapping in is not atomic...

> Stopping a node during compaction can make already written files stay around
> ----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-8124
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8124
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Marcus Eriksson
>            Assignee: Marcus Eriksson
>              Labels: triaged
>             Fix For: 2.1.2
>
>         Attachments: 0001-8124-wip.patch
>
>
> In leveled compaction we generally create many files during compaction, in 
> 2.0 we left the ones we had written as -tmp- files, in 2.1 we close and open 
> the readers, removing the -tmp- markers.
> This means that any ongoing compactions will leave the resulting files around 
> if we restart. Note that stop:ing the compaction will cause an exception and 
> that makes us call abort() on the SSTableRewriter which removes the files.
> Guess a fix could be to keep the -tmp- marker and make -tmplink- files until 
> we are actually done with the compaction.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to