Skip to content

fix: expel is blocked by master switchover even if replicas are offline

Georgy Moshkin requested to merge gmoshkin/master-switchover-at-expel into master

Summary

  • fix: don't update current_master_id until it synchronizes

This patches changes when we update current_master_id during consistent master switchover. Now it is updated as soon as we determine that the new master has synchronized it's vclock with the old master.

As a result we can now block expel of a non-last replica in cases where other replicas are offline, which is crucial because instances can easily become offline due to temporary network issues.

  • fix: expel is blocked my master switchover even if replicas are offline

  • fix: change definition of Instance::may_respond

Now we assume instance may not respond if

  • target state is Offline (non-graceful assumed)
  • current state is Expelled
  • test: add a failing test for bucket rebalancing before instance expel

  • test: don't panic libtestplug.so in case of unauthorized RPC

  • refactor: cleanup code in resolve_rpc_target


Edited by Georgy Moshkin

Merge request reports