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

Stefania commented on CASSANDRA-10421:
--------------------------------------

bq. So if I understand the proposed action on restart is to retain all 
available files including the ones that have been newly created in the failed 
transaction and compact it later? 

Yes, it is mainly to protect old files but it would leave new files as well. We 
log an error at the moment and we leave it to the user to handle this. We plan 
on enhancing this in CASSANDRA-10112.

bq. If we can find a record that says a file should be added we know that it is 
theoretically complete.

No, because we add these records before the new files are even created, to make 
sure they get deleted at all times should the transaction fail. Only the final 
commit record indicates that new files are safe to use.

bq. I don't know if it matters that the files wasn't completed or what happens 
if we try and load partial files. 

Most likely a corrupt sstable exception will halt start-up depending on disk 
failure policy. 

bq. Since we support early opening can we retain partial files usefully? Or do 
we delete files that don't have some log record somewhere adding them?

Not at the moment, unless we support this when reading sstables. From the 
transaction log point of view, early opening is transparent, we track them as 
any other new sstable file and they become final only when the commit record is 
added. 

> 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)

Reply via email to