zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] lanicc opened a new pull request #1744: ZOOKEEPER-4362: ZKDatabase.txnCount should not log non transactional requests
Date Wed, 01 Sep 2021 09:17:31 GMT

lanicc opened a new pull request #1744:
URL: https://github.com/apache/zookeeper/pull/1744


   ZKDatabase.txnCount logged non transactional requests
   
       public boolean append(Request si) throws IOException {
           txnCount.incrementAndGet();
           return this.snapLog.append(si);
       }
   snaplog.append may return false, but txnCount increased
   
   maybe it would be better
   
       public boolean append(Request si) throws IOException {
           if (this.snapLog.append(si)) {
               txnCount.incrementAndGet();
               return true;
           }
           return false;
       }
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message