You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Jono Morris (Jira)" <ji...@apache.org> on 2020/03/03 08:43:00 UTC

[jira] [Commented] (ZOOKEEPER-3735) fix the bad format of RATE_LOGGER

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-3735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17050007#comment-17050007 ] 

Jono Morris commented on ZOOKEEPER-3735:
----------------------------------------

Looks like there were code changes to the DataTree deserializeZxidDigest method that now prevents this log entry from being called:
{code:java}
// There is possibility that the start zxid of a snapshot might
// be larger than the digest zxid in snapshot.
//
// Known cases:
//
// The new leader set the last processed zxid to be the new
// epoch + 0, which is not mapping to any txn, and it uses
// this to take snapshot, which is possible if we don't
// clean database before switching to LOOKING. In this case
// the currentZxidDigest will be the zxid of last epoch and
// it's smaller than the zxid of the snapshot file.
//
// It's safe to reset the targetZxidDigest to null and start
// to compare digest when replaying the first txn, since it's
// a non fuzzy snapshot.
if (digestFromLoadedSnapshot != null && digestFromLoadedSnapshot.zxid < startZxidOfSnapshot) {
    LOG.info("The zxid of snapshot digest 0x{} is smaller "
            + "than the known snapshot highest zxid, the snapshot "
            + "started with zxid 0x{}. It will be invalid to use "
            + "this snapshot digest associated with this zxid, will "
            + "ignore comparing it.", Long.toHexString(digestFromLoadedSnapshot.zxid),
            Long.toHexString(startZxidOfSnapshot));
    digestFromLoadedSnapshot = null;
} {code}
See merged pull request made on 28 December 2019:

 https://github.com/apache/zookeeper/commit/2805e8982c0e8964e5f8d86f4b01a293d75d4aed#diff-34ed8496c20dac2e2d52c3662a9224f2

> fix the bad format of RATE_LOGGER
> ---------------------------------
>
>                 Key: ZOOKEEPER-3735
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3735
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: maoling
>            Priority: Minor
>
> {code:java}
> } else if (digestFromLoadedSnapshot.zxid != 0 && zxid > digestFromLoadedSnapshot.zxid) {
>     RATE_LOGGER.rateLimitLog("The txn 0x{} of snapshot digest does not "
>             + "exist.", Long.toHexString(digestFromLoadedSnapshot.zxid));
> }
> {code}
> the printed log likes this:
> {code:java}
> Message:The txn 0x{} of snapshot digest does not exist. Value:fa4e00000082
> {code}
> *1. 0x{}* takes no effort
> *2. RATE_LOGGER.rateLimitLog* doesn't use like the ordinary LOG



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