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

Sylvain Lebresne commented on CASSANDRA-2088:
---------------------------------------------

Committed that first part. I think we should keep that open to fix the tmp 
files for failed compaction and move the rest to another ticket (like 
CASSANDRA-2433 for instance).

About the attached patch on cleaning up failed compaction:
  * We should also handle cleanup and scrub
  * We should handle SSTableWriter.Builder as it is yet another place where we 
could miss to cleanup a tmp file on error.
  * In theory a failed flush could leave a tmp file behind. If that happens 
having a tmp file would be the least of your problem but for completeness sake 
we could handle it.
  * The logging when failing to close iwriter and dataFile in SSTableWriter 
could probably go at error (we should not be failing there, if we do something 
is wrong)
  * That's nitpick but I'm not a huge fan of catching RuntimeException in this 
case as this pollute the code for something that would be a programming error 
(that's probably debatable though). Maybe another solution would be to have 
this in the final block. It means making sure closeAndDelete() is ok with the 
file being already closed and/or deleted and having this final block *after* 
the closeAndOpenReader call.


> Temp files for failed compactions/streaming not cleaned up
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-2088
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2088
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Stu Hood
>            Assignee: Aaron Morton
>             Fix For: 0.8
>
>         Attachments: 
> 0001-Better-detect-failures-from-the-other-side-in-Incomi.patch, 
> 0001-detect-streaming-failures-and-cleanup-temp-files.patch, 
> 0002-delete-partial-sstable-if-compaction-error.patch
>
>
> From separate reports, compaction and repair are currently missing 
> opportunities to clean up tmp files after failures.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to