You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "huangwenbo (Jira)" <ji...@apache.org> on 2020/12/25 11:26:00 UTC

[jira] [Commented] (ZOOKEEPER-4038) when logfile zxid equals to target zxid, should not iterate over the next logfile (FileTxnLog:653)

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

huangwenbo commented on ZOOKEEPER-4038:
---------------------------------------

{code:java}
if (Util.getZxidFromName(f.getName(), LOG_FILE_PREFIX) > zxid) {
    storedFiles.add(f);
} else if (Util.getZxidFromName(f.getName(), LOG_FILE_PREFIX) <= zxid) {
    // add the last logfile that is less than the zxid
    storedFiles.add(f);
    break;
}
{code}
In short, the equal sign should be inside the else if parentheses

> when logfile zxid equals to target zxid, should not iterate over the next logfile (FileTxnLog:653)
> --------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-4038
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4038
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: huangwenbo
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)