[
https://issues.apache.org/jira/browse/CASSANDRA-10421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14946454#comment-14946454
]
Stefania commented on CASSANDRA-10421:
--------------------------------------
[~aweisberg], [~benedict] : I've attached a
[patch|https://github.com/stef1927/cassandra/commits/10421-windows-3.0] and it
is ready for review. Don't be confused by the word _windows_ in the branch
name, it's just so that we can have CI on Windows as well as on Linux.
We don't duplicate all records to all files, only the final commit or abort
flag is written to all files. When we read the files on startup we collect all
the sstable records from all existing txn files and check that the final flag
record is the same in all files (but we do accept if some files are missing the
last record and in this case we just warn). Therefore, if a file is lost we
continue with the transaction processing but we do not touch the sstables in
the folder of that file. Chances are either the entire disk was lost or the
user deleted the file and in this case the user probably wanted to keep the
sstables. Does this make sense?
When writing the final commit or abort record we throw _only if we fail to
write to all files_.
The abstraction names that I've chosen are {{LogFileSegment}} to represent an
individual log file and {{LogFile}} to represent their ensemble. Feel free to
suggest something else if you prefer, like {{LogFile}} and {{LogFileXXXX}}, I
just could not come up with a suitable {{XXXX}} other than {{LogFiles}},
{{LogFileManager}}, {{LogFileEnsemble}}, none of which I really liked.
h5. CI Linux:
http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-10421-windows-3.0-testall/
http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-10421-windows-3.0-dtest/
h5. CI Windows:
http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-10421-windows-3.0-utest_win32/
http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-10421-windows-3.0-dtest_win32/
> Potential issue with LogTransaction as it only checks in a single directory
> for files
> -------------------------------------------------------------------------------------
>
> Key: CASSANDRA-10421
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10421
> 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()|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/lifecycle/LogTransaction.java#L125]}}
> 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 created:
> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/lifecycle/LogRecord.java#L163
> cc [~Stefania]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)