Repository navigation
Open
Labels
P3Low priority; do when convenientLow priority; do when convenientarea:server-zdComponent: server-zdComponent: server-zdcodex-readySelf-contained; can be handed to a Codex worker as isSelf-contained; can be handed to a Codex worker as issize:SAbout a day or lessAbout a day or lesstype:tech-debtRefactor or cleanup without behavior changeRefactor or cleanup without behavior change
Description
Observed
Small items found in review of #1182 (head 68bbcf3), after it merges. None changes correctness in normal runs.
- Swap order leaves a tiny window.
swap_in_serving_instanceinserver-zd/crates/dexzd-server/src/server_node/node_lifecycle.rscallsGrpcServer::start_serving(whose task may serve at once) beforestandby_instance.refuse_public_calls_as_replaced(). A call on a standby connection sent after the serving instance answered its first call could still read theStartinggate state. Fix: callgrpc.refuse_public_calls_as_replaced()before thestd::mem::replace. - Stale doc comments.
server-zd/crates/dexzd-server/src/server_node/grpc_server.rsaround line 63 ("Public services serve once activated") and line 93 ("answer UNAVAILABLE until activated"): a serving instance now serves from its start, and standby instances never serve.StartupServiceno longer describes what the gate does; consider a precise name such asPublicCallGate. Update only outdated references; keep the rest of each existing comment. - R18 comment length. New comment blocks over 20 words: the doc comment near line 205–208 of
server-zd/crates/dexzd-server/tests/serve_process/startup_calls.rs, and the doc comment ofNodeGroup::note_serving_periodintests/serve_process/standby_failover/node_group.rs. Shorten them. - Hypothesis, unverified: possible flake in
standby_failover::step_down::step_down_keeps_the_answer_of_a_call_that_ends_before_the_release. The gate'sbiasedselect prefersperiod_end. If the RPC task ends in the drain but its handler has not returned when the release completes andend_public_callsruns (for example under a host stall), the call becomes UNAVAILABLE and the test fails. Check whether the InvokeRPC handler awaits anything after its RPC task ends; if so, make the test robust or make the handler complete before the release.
Acceptance
- Items 1–3 fixed;
make clippy,make rust-rules-check, andcargo test -p dexzd-server --test serve_process startup_callspass. - Item 4: either a short note in the PR showing the window does not exist, or a fix with the test run 20 times locally without failure.
Metadata
Metadata
Assignees
Labels
P3Low priority; do when convenientLow priority; do when convenientarea:server-zdComponent: server-zdComponent: server-zdcodex-readySelf-contained; can be handed to a Codex worker as isSelf-contained; can be handed to a Codex worker as issize:SAbout a day or lessAbout a day or lesstype:tech-debtRefactor or cleanup without behavior changeRefactor or cleanup without behavior change
Activity