fix: expel is blocked by master switchover even if replicas are offline
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
- Cherry-pick to: none
- Closes: #186, #1055 (closed)
- Docs follow-up: docs#395 (closed)
- changed return value of proc_replication
- new RPC proc_replication_sync
Edited by Georgy Moshkin