Make sequencer aware of the locality of the primary region#7529
Conversation
to the sequencer, rather than deriving it from "MasterInterface" on the sequencer (which is not correct).
Doxense CI Report for Windows 10
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
jzhou77
left a comment
There was a problem hiding this comment.
LGTM
Make sure to test this in a HA setup before merging.
I haven't run a Kubernetes test recently (and never explicitly ran a HA test), so it may take a while for me to do this. Is there an alternative way of verifying this? Or, maybe I can file another follow up radar for the HA testing part (if that is the only way of testing this)? |
Ok, I will try that. Thanks! |
I applied the following diff: The following test causes the sequencer to crash (trying to do "std::stoi()"), on "main", over the above diff:
The test succeeds over the changes in this PR. The primary locality id on the sequencer is getting set to "-1" (in this test). |
Make sequencer aware of the locality of the primary region
Can you create a PR with your test changes? I think it's worth making the change to catch any future regression. |
I am not sure we can check in this change. Check the top comment in "SimulationConfig::setRegions()" - maybe there are similar assumptions at other places too. |
Make sequencer aware of the locality of the primary region
This is in the context of HA-related version vector optimization: propagate the locality of the primary region from ClusterController to the sequencer, rather than deriving it from "MasterInterface" on the sequencer (which is not correct).
Testing:
Simulation tests:
Compiler: gcc.
Version vector disabled: 20220706-102147-sre-f3f7f09b7eac8fd9 (no failures).
Version vector enabled, knob ENABLE_VERSION_VECTOR_HA_OPTIMIZATION enabled: 20220706-103407-sre-180fb8af27a15e6d (no failures).
Code-Reviewer Section
The general guidelines can be found here.
Please check each of the following things and check all boxes before accepting a PR.
For Release-Branches
If this PR is made against a release-branch, please also check the following:
release-branchormainif this is the youngest branch)