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

Aaron McCurry commented on BLUR-132:
------------------------------------

This patch looks really good Rahul.  However there are 2 issues I see with it.

1. I don't see how you delete the snapshot files on the file system when the 
"removeSnaphot" method is called.  Probably just a file remove.
2. In the "createSnapshot" method, I think that you want to atomically create 
the snapshot file.  So that way it's either fully created with data present or 
not there at all.  We probably want that behavior, so that if the process goes 
down before the close method is called we don't get a partially written file.  
To achieve you will want to create a temp file in the directory with some known 
temp extension (for cleanup) write the contents to the file, close and then 
rename the file to it's final name (check that the rename is successful through 
the return on rename).  Also you should remove the temp file(s) when you load 
the snapshots so that they get cleaned up at some point.

Thanks again!
                
> Create Index Snapshots
> ----------------------
>
>                 Key: BLUR-132
>                 URL: https://issues.apache.org/jira/browse/BLUR-132
>             Project: Apache Blur
>          Issue Type: New Feature
>    Affects Versions: 0.3.0
>            Reporter: Aaron McCurry
>             Fix For: 0.3.0
>
>         Attachments: Blur-132-part1.patch, blur-132-part2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to