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

ASF GitHub Bot updated ZOOKEEPER-4029:
--------------------------------------
    Labels: pull-request-available  (was: )

> 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: Ling Mao
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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)

Reply via email to