[
https://issues.apache.org/jira/browse/CASSANDRA-10421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14960241#comment-14960241
]
Stefania commented on CASSANDRA-10421:
--------------------------------------
bq. Syncing the directory won't sync the log file. You need sync the log file
specifically to have that data be available.
Thanks, I should've read the entire documentation of fsync.
bq. I don't mind opening the file every time. However to sync it after every
write you will need to keep it open long enough to do that. Or open it O_SYNC
or something.
We can actually append and sync via {{Files.write}} with
{{StandardOpenOption.SYNC}}.
Latest commit is
[here|https://github.com/stef1927/cassandra/commit/4866ce93328108ab09dcc10596ab1ea0c4b76f9d].
I'm monitoring dtests, it seem we get lots of timeouts but when I run the tests
locally they pass, let's see if the next batch is better.
> 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)