You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "kevin.chen (JIRA)" <ji...@apache.org> on 2018/08/20 09:13:00 UTC

[jira] [Assigned] (ZOOKEEPER-3115) Delete snapshot file on error

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-3115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

kevin.chen reassigned ZOOKEEPER-3115:
-------------------------------------

    Assignee: kevin.chen

> Delete snapshot file on error
> -----------------------------
>
>                 Key: ZOOKEEPER-3115
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3115
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.6.0
>            Reporter: Brian Nixon
>            Assignee: kevin.chen
>            Priority: Minor
>
> ZOOKEEPER-3082 guards against one particular failure mode that can cause a corrupt snapshot, when a empty file is created with a valid snapshot file name. All other instances of IOException when writing the snapshot are simply allowed to propagate up the stack.
> One idea that came up during review ([https://github.com/apache/zookeeper/pull/560)] was whether we would ever want to leave a snapshot file on disk when an IOException is thrown. Clearly something has gone wrong at this point and rather than leave a potentially corrupt file, we can delete it and trust the transaction log when restoring the necessary transactions.
> It would be great to modify FileTxnSnapLog::save to delete snapshot files more often on exceptions - provided that there's a way to identify when the file in that case is needed or corrupt.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)