feat(worker-rejoin-resync): task 6.1 - trigger reconciliation on rejoin

Arm a reconciliation round in apply_join_state() the moment a worker
host becomes connected (first join, reconnect, or failover-reconnect -
all routed through the same shared call site, Req 1.1-1.3), then send
the query from on_worker_join() strictly after the join reply and
existing config push (Req 2.1-2.2), verified via a structural test
that reads real wire order off the endpoint queue.

Also closes Req 3.7's config-delivery seam end-to-end: worker_resync_
window_ms now rides the existing Conf4Worker push (clustername
precedent, no new opcode) and the worker applies it to its retention
window on receipt.

Fixes bug-1752: myreq_handler had no OPCode_push dispatch case at all,
so every config push - including the pre-existing clustername field -
was silently discarded. Confirmed harmless until now (clustername was
never read anywhere in src/worker/); closed narrowly for
worker_resync_window_ms only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y4M5MJM2zK6nU43da267Ku
This commit is contained in:
Rongsong Shen 2026-09-01 19:43:18 +00:00
parent 48c6cfd58a
commit a3d12d37d9
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
8 changed files with 1045 additions and 3 deletions

View file

@ -72,6 +72,11 @@ typedef struct {
char* clustername;
int n_confvars;
xce_config_t** confvars;
/* worker-rejoin-resync task 6.1 (Req 3.7): mirrors clustername above --
* pulled directly from c->myconf->cluster_config->worker_resync_window_ms
* (worker.c's worker_push_config()), not part of the generic confvars
* key/value list. */
int worker_resync_window_ms;
} xce_conf4worker_t;
typedef struct {