[ https://issues.apache.org/jira/browse/ZOOKEEPER-882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916122#action_12916122 ]
Jared Cantwell commented on ZOOKEEPER-882: ------------------------------------------ Maybe I am misunderstanding the FileTxnLog.next() call, but I interpret the following: - Based on its usage, the next() call should prepare the next hdr and record, and return true if it did this successfully, and false otherwise. - if the catch() executes, it means that we couldn't prepare from the current file, so we need to move to the next - goToNextLog() simply swaps the log file, but does not prepare hdr and record, so the current ones will remain current and get processed a second time If any of this is wrong, than my patch probably doesn't make sense, so please let me know. As far as the second point, I agree that init() is inclusive. So you want to pass in as a parameter something that has not yet been processed. So, if we pass in lastProcessedZxid (which is already in the snapshot), then that will be read from the log also since init() starts at that transaction, not one past it. Is that right? > Startup loads last transaction from snapshot > -------------------------------------------- > > Key: ZOOKEEPER-882 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-882 > Project: Zookeeper > Issue Type: Bug > Components: server > Reporter: Jared Cantwell > Priority: Minor > Attachments: 882.diff > > > On startup, the server first loads the latest snapshot, and then loads from > the log starting at the last transaction in the snapshot. It should begin > from one past that last transaction in the log. I will attach a possible > patch. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.