You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "LiAoNan (Jira)" <ji...@apache.org> on 2021/09/01 00:20:00 UTC
[jira] [Created] (ZOOKEEPER-4362) ZKDatabase.txnCount logged non
transactional requests
LiAoNan created ZOOKEEPER-4362:
----------------------------------
Summary: 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
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.3.4#803005)