The main code is at Learner.java syncWithLeader like this:
if (qp.getType() == Leader.DIFF) {
    LOG.info("Getting a diff from the leader 0x{}",
Long.toHexString(qp.getZxid()));
    snapshotNeeded = false;
}

case Leader.COMMITANDACTIVATE:
    if (!writeToTxnLog) {
        if (pif.hdr.getZxid() != qp.getZxid()) {
            LOG.warn("Committing " + qp.getZxid() + ", but next
proposal is " + pif.hdr.getZxid());
        } else {
            zk.processTxn(pif.hdr, pif.rec);
            packetsNotCommitted.remove();
        }
    } else {
        packetsCommitted.add(qp.getZxid());
    }
    break;

zk.startup();//this will create the processor chain,and waiting
request will be processed after the zk startup

if (zk instanceof FollowerZooKeeperServer) {
    FollowerZooKeeperServer fzk = (FollowerZooKeeperServer)zk;
    for(PacketInFlight p: packetsNotCommitted) {
        fzk.logRequest(p.hdr, p.rec);
    }
    for(Long zxid: packetsCommitted) {
        fzk.commit(zxid);
    }
}

yuzhou li <[EMAIL PROTECTED]> 于2018年6月14日周四 下午1:47写道:
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB