cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ariel Weisberg (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-10421) Potential issue with LogTransaction as it only checks in a single directory for files
Date Thu, 15 Oct 2015 22:15:05 GMT


Ariel Weisberg commented on CASSANDRA-10421:

So what I think I see is that when the LogTransaction completes it first writes to the log
the commit record, and then starts making permanent changes to the the files on disk (deleting
the old ones). But if it hasn't actually synced the log to disk then on a restart we could
have a partial log and attempt to roll back, but it is too late because before the crash we
had already deleted parts of the before state. At the end we should sync the log files before
deleting the obsolete files right?

Before we add a new file that we want to have cleaned up maybe we also want to make sure the
record is one disk so that it will definitely be cleaned up? Maybe not necessary since it
is just additional data that will be compacted later.

Maybe optimizing for power failure isn't necessary, but then why are we syncing directories?

[Here it seems like you don't sync the folder when appending every record?|].
Was the intent to sync the folder when creating the log file or when adding a record which
indicates the addition of other data files?

I am generally +1 other then my confusion over how syncing of the log file contents is handled.

The tests don't seem to match trunk. I gave them another spin on the 3.0 branch to get another

> Potential issue with LogTransaction as it only checks in a single directory for files
> -------------------------------------------------------------------------------------
>                 Key: CASSANDRA-10421
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Marcus Eriksson
>            Assignee: Stefania
>            Priority: Blocker
>             Fix For: 3.0.0 rc2
> When creating a new LogTransaction we try to create the new logfile in the same directory
as the one we are writing to, but as we use {{[directories.getDirectoryForNewSSTables()|]}}
this might end up in "any" of the configured data directories. If it does, we will not be
able to clean up leftovers as we check for files in the same directory as the logfile was
> cc [~Stefania]

This message was sent by Atlassian JIRA

View raw message