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

[jira] [Created] (ZOOKEEPER-4029) improve the log of FileTxnLog#append method

maoling created ZOOKEEPER-4029:
----------------------------------

             Summary: improve the log of FileTxnLog#append method
                 Key: ZOOKEEPER-4029
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4029
             Project: ZooKeeper
          Issue Type: Improvement
          Components: server
            Reporter: maoling


We found the following logs that it's very confusing
{code:java}
2020-12-16 15:19:09,202 [myid:5] - WARN  [SyncThread:5:FileTxnLog@275] - Current zxid 858993459201 is <= 858993459203 for -10
2020-12-16 15:19:09,202 [myid:5] - WARN  [SyncThread:5:FileTxnLog@275] - Current zxid 858993459202 is <= 858993459203 for -10
2020-12-16 15:19:09,203 [myid:5] - WARN  [SyncThread:5:FileTxnLog@275] - Current zxid 858993459203 is <= 858993459203 for 5
{code}
The potential improvement may be:
{code:java}
if (hdr.getZxid() <= lastZxidSeen) {
    LOG.warn(
        "Current zxid {} is <= {} for operation {}",
        hdr.getZxid(),
        lastZxidSeen,
        Request.op2String(hdr.getType()));
} else {
    lastZxidSeen = hdr.getZxid();
}
{code}
 



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