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

Stefania commented on CASSANDRA-7066:
-------------------------------------

[~benedict] I've pushed a few more commits which are ready for review. I've 
also rebased and squashed the old commits.

I hope I understood correctly regarding doCommit(): I opted for committing the 
txn logs in prepare since it seemed kind of weird to throw in doCommit(). The 
doAbort() is a bit clunky. Basically we create the sstable tidiers during the 
prepare but only mark the sstables as compacted after the commit. Likewise for 
abort, we undo any tidiers due to an exception thrown in prepare, then we 
prepare the tidiers for the new obsoleted files in doAbort() but trapping any 
exception, this is the part that's a bit clunky, then we run txn logs abort and 
then mark the new obsoleted as compacted. Perhaps we should make use of the 
cleanup methods.

Regarding CASSANDRA-9165, it is mostly about integrating byteman, right?


> Simplify (and unify) cleanup of compaction leftovers
> ----------------------------------------------------
>
>                 Key: CASSANDRA-7066
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7066
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: Stefania
>            Priority: Minor
>              Labels: compaction
>             Fix For: 3.x
>
>         Attachments: 7066.txt
>
>
> Currently we manage a list of in-progress compactions in a system table, 
> which we use to cleanup incomplete compactions when we're done. The problem 
> with this is that 1) it's a bit clunky (and leaves us in positions where we 
> can unnecessarily cleanup completed files, or conversely not cleanup files 
> that have been superceded); and 2) it's only used for a regular compaction - 
> no other compaction types are guarded in the same way, so can result in 
> duplication if we fail before deleting the replacements.
> I'd like to see each sstable store in its metadata its direct ancestors, and 
> on startup we simply delete any sstables that occur in the union of all 
> ancestor sets. This way as soon as we finish writing we're capable of 
> cleaning up any leftovers, so we never get duplication. It's also much easier 
> to reason about.



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

Reply via email to