Repository navigation
test(meta): check publication session at its Applied receipt - #316
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe integration test now checks that a ChangesData publication test
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The test checks that the replacement is applied on the original connection while retaining its other publication checks. No merge-blocking issue was established. Pre-merge checks |
|
Context
meta_integration.gate_data_publicationcounts accepted connections until the cluster returns to READY. A replacement can finish on its original connection, then a delayed lease Grant can expire and correctly trigger reauthentication before that readiness check. The test reports this later reconnect as a publication failure.Based on current main (
bdb0d2e12), following the merge of #314.Behavior before and after
Wait for the first
FullStateAppliedafter the obsolete transfer'sTransferAbort, and require that receipt to come from the connection which carried the held chunk. A replacement completed through a new connection still fails. Lease recovery after the replacement completes no longer causes this assertion to fail.Implementation
Change only the existing integration test. Preserve the obsolete-object
TransferEndrejection, final READY check, and proxy-error checks.Design decisions and alternatives
Correlate the actual completion receipt with its socket pair. This gives the assertion a protocol-defined endpoint instead of widening timing budgets or permitting reconnection during replacement.
Documentation and comments
Added a nearby comment explaining the distinction between Applied completion and subsequent lease recovery. No architectural claims or production behavior change.
Test plan
cmake --build build_debug --target lavik-meta lavik-ctl --parallel 6 ctest --test-dir build_debug -R '^meta_integration.gate_data_publication$' --output-on-failure --repeat until-fail:30 pre-commit run --files tests/meta_integration/gate_data_publication.py git diff --checkBuild, all 30 consecutive integration runs, formatting, and diff checks passed.
Controlled proxy probes also checked both sides of the assertion:
lease grant arrived after its deadline; the replacement's Applied receipt precedes the reconnect on the original connection. The old test fails its reconnect-count assertion; the updated test passes.TransferAbort, forcing replacement bootstrap on a new connection. The updated test still fails its session assertion.The original CI failure did not retain server logs, so its exact reconnect cause cannot be recovered. These probes demonstrate the assertion's false-positive case and confirm that the required in-session replacement behavior remains checked.
Risk assessment
Limited to test synchronization and assertion scope. Production code and lease-expiry enforcement are unchanged.
Rollback plan
Revert this test-only commit.
Reviewer guide
Review the Applied-receipt wait and socket-pair comparison in
gate_data_publication.py.Follow-up work
CI validation on both architectures.
Summary by CodeRabbit