Repository navigation
test: wait for replica readability in native handoff gate - #362
Merged
Merged
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 1
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Context
AMD64 shard 2 failed when
handoff_orderread its seed during the transition from initialization to steady Follow Owner replication. The replica had completed FULL, but returnedLOADINGwhile reconnecting.Behavior before and after
The test previously assumed that Meta reporting ready guaranteed an immediately readable replica. It now waits up to 30 seconds for the seed to become readable with its expected value.
Implementation
Use the existing
H.wait_untilandC.readonly_gethelpers. Each probe opens a fresh connection. Keep the handoff ordering assertion and subsequent incremental-tail check.Design decisions and alternatives
Use the same bounded data-plane polling pattern as nearby native replication scenarios. Persistent failures still fail the test.
Documentation and comments
Add a local comment explaining the initialization-to-Follow-Owner reconnect window. No architecture change: this only corrects test synchronization.
Test plan
cmake --build build_ci --target lavik lavik-meta lavik-ctl --parallel 6— passed, using the existing fault-enabled Debug configuration.LAVIK_TEST_DATA_DIR=/mnt/dev ctest --test-dir build_ci -R '^meta_integration\.gate_native_replication$' --output-on-failure— passed in 491.81 seconds.LAVIK_TEST_DATA_DIR=/mnt/dev python3 /tmp/lavik-handoff-repeat.py— five sequential runs of the existinghandoff_orderfixture passed with the same binaries. The local runner only sets the executable paths and calls the fixture in a fresh temporary directory for each run.pre-commit run— passed.git diff --cached --check— passed.Risk assessment
Test-only change; an unreadable or incorrect seed fails after the bounded wait.
Rollback plan
Revert this commit.
Reviewer guide
Review the readiness probe in
handoff_order.Follow-up work
None.