Before learner receives the leader UPTODATE request, the loop run like this:
case Leader.PROPOSAL:
PacketInFlight pif = new PacketInFlight();
pif.hdr = new TxnHeader();
pif.rec = SerializeUtils.deserializeTxn(qp.getData(),
pif.hdr);//deserialize data
packetsNotCommitted.add(pif);//
Data synchronization is already done if the execution hits the zk.startup
(note the previous while loop will only break if learner receives leaders
up to date message).
On Wed, Jun 13, 2018 at 10:51 PM, yuzhou li wrote:
> The main code is at Learner.java syncWithLeader like this:
> if (qp.getTyp
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() !=
Hi,everyone.
I git pull the tag release-3.5.4 from github. Before I read the
3.4.6 version code, I found 3.5.4 has some changes when the learner
synchronzied with leader.
If using DIFF way to synchronize histories, the follower or observer
will put the data in a queue, then start zkServer, then