You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Ling Mao (Jira)" <ji...@apache.org> on 2021/11/13 07:22:00 UTC

[jira] [Resolved] (ZOOKEEPER-4362) ZKDatabase.txnCount logged non transactional requests

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

Ling Mao resolved ZOOKEEPER-4362.
---------------------------------
    Resolution: Fixed

> ZKDatabase.txnCount logged non transactional requests
> -----------------------------------------------------
>
>                 Key: ZOOKEEPER-4362
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4362
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: LiAoNan
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> ZKDatabase.txnCount logged non transactional requests
> {code:java}
>     public boolean append(Request si) throws IOException {
>         txnCount.incrementAndGet();
>         return this.snapLog.append(si);
>     }
> {code}
> snaplog.append may return false, but txnCount increased
> maybe it would be better
> {code:java}
>     public boolean append(Request si) throws IOException {
>         if (this.snapLog.append(si)) {
>             txnCount.incrementAndGet();
>             return true;
>         }
>         return false;
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)