cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-7066) Simplify (and unify) cleanup of compaction leftovers
Date Wed, 29 Jul 2015 09:14:05 GMT


Benedict commented on CASSANDRA-7066:

Thanks Stef.

A couple of comments about the description:
* It would be helpful to elaborate "replace the compactions_in_progress system table" to include
a mention of the elimination of temporary file markers.
* It would be helpful to mention that if restoring from backup, these files should either
be deleted (in the case of a full backup), or confirmed not to reference the files they're
** Perhaps we should offer a tool, like sstablelister, to offline complete any transaction
log files, which can be specified as prep-work for backup restore
* I've noticed a few English speakers (including in this conversation here) use "loose" as
"lose" which no doubt encouraged you to do the same. But it's incorrect :)

As far as the patch goes, it looks good to me on the whole (though I'll give it a full review
once we've finalised the details). In the meantime, the incremental checksum at the very least
seems like a good idea to detect even slight corruption of the log file (on the assumption
that such corruption might indicate we've lost the commit record, and had been in the process
of it, which seems to be one of the concerns). 

I agree about individual files over-complicating things, however we _could _ perhaps take
the maximum last modified of all files with that descriptor, and then delete the files in
ascending order of last modified. This would just help the log files be robust to backups
being copied in with these files still present and referencing them as old, and also to some
potential effects of problems like CASSANDRA-9908.

> Simplify (and unify) cleanup of compaction leftovers
> ----------------------------------------------------
>                 Key: CASSANDRA-7066
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: Stefania
>            Priority: Minor
>              Labels: benedict-to-commit, compaction
>             Fix For: 3.0 alpha 1
>         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

View raw message