ZOOKEEPER-4394: Learner.syncWithLeader got NullPointerException
This PR resolves ZOOKEEPER-4394.
The first commit adds a failing test that demonstrates that a leader sending an outstanding proposal during a DIFF will cause an NPE if the commit to the proposal comes before the UPTODATE.
The second commit fixes the failing test and addresses the problem by splitting packetsNotCommitted to a separate field called packetsNotLogged. The former keeps track of packets that needs to be committed while the latter keeps track of packets that needs to be logged.
See individual commit messages for more details.
:warning: 52 God Classes were detected by Lift in this project. Visit the Lift web console for more details.
Is this PR getting superseded by #2152?
Ping
Is this PR getting superseded by #2152?
@kezhuw Do you agree? Can we close this patch in favor of #2152 ?
I would prefer #2152. @anmolnar