Fix[MQB]: Enable strong consistency CSL and fix leader activeness #495
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enable strong consistency by default everywhere we use CSL. Before, it was in eventual consistency everywhere. I updated the unit tests to also test in strong consistency. Most integration tests pass in strong consistency, except a few related to appIds. This proves the race condition around
Domain::configure
, which @dorjesinpo fixed in Refactoring App registration #493.I enhanced the resiliency of the elector logic by prohibiting to set leader status directly from
e_UNDEFINED
toe_ACTIVE
. It should always go frome_UNDEFINED -> e_PASSIVE -> e_ACTIVE
. Here is a small diagram of the current triggers to leader status transition. I am adding a new transition frome_PASSIVE
toe_ACTIVE
duringElectorInfo::onHealedFollower()
in this PR. I also fixed the logic of some observers to the leader status via theonClusterLeader
method.