Aleksandr Lyapunov
authored
Fix several problems that led to unexpected results: * Handle error thrown by box.clt.promote. Not very often but it could fail ruining the test. Fixed by retry. * It's not so obvious but RO server after successful call of box.ctl.promote for some time remains RO. On the other hand both net.replicaset and the test rely box.info.ro to define the leader, for in their view the actual switch to the new leader happens some (perhaps different) time after call to box.ctl.promote. That asynchrony sometimes led to unexpected results. Fixed by waiting of RW status. * The fix above (wait for RW of the new leader) introduced new problem: in case with sequential leader change and broadcast of new values, the new leader has good chances (but not 100%) to deliver old broadcasted value to the watcher. Fix it by splitting the sequence to the leader change with verification and broadcast with verification. * The similar problem happens when a test starts. It may happen that all instances are RO, so the initial broadcast on actual leader is run with wrong value (that a replica must use). Fix it by waiting for a leader to become RW. Follow-up #9823 NO_DOC=fix flaky test NO_CHANGELOG=fix flaky test
Name | Last commit | Last update |
---|