feat(worker-rejoin-resync): task 6.2 - route job-state report to reconciliation
Add OPCode_jobStateReport dispatch in myreq_handler, reassembling a report across multiple incoming pages before handing it to task 3.2's resync_apply_report() exactly once - proven via a test-only call counter, not just end-state equivalence (a double-apply could pass an end-state check if idempotent). Standby-redirect investigation (Req 8.1/8.3): confirmed ha_dispatch_gate already redirects every rejected opcode uniformly, so no opcode-specific code was needed for that. OPCode_jobStateQuery has no controller-side receive path at all (only sent, never received) so needed no gate change either. That same investigation found a different, more consequential gap: fixes bug-1753, ha_dispatch_gate's quorum-loss fact-admission allowlist (OPCode_notify/update/setpreason/clrpreason) was missing OPCode_jobStateReport, so a report arriving during a transient quorum-loss window - this feature's own core failover scenario - would be rejected outright with no retry (worker sends fire-and-forget). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4M5MJM2zK6nU43da267Ku
This commit is contained in:
parent
a3d12d37d9
commit
9f655c61c7
12 changed files with 1178 additions and 12 deletions
|
|
@ -4688,11 +4688,22 @@ int ha_dispatch_gate(ha_state_t *ha, int opcode)
|
|||
* Rejecting them loses the fact forever: the reporter never
|
||||
* retries (bug-396). Admit so the RETAIN path can append and
|
||||
* hold them until quorum returns (Req 3.2; umbrella 2.8 —
|
||||
* facts are retained, never dropped). */
|
||||
* facts are retained, never dropped).
|
||||
*
|
||||
* worker-rejoin-resync task 6.2: OPCode_jobStateReport is the
|
||||
* exact same shape — a worker's already-happened job-state
|
||||
* facts, sent fire-and-forget (xce_job_state_report_req(),
|
||||
* request.c) with no redelivery on rejection, exactly like
|
||||
* OPCode_notify. Rejecting it outright here during a transient
|
||||
* quorum-loss window would reproduce bug-396's own loss mode
|
||||
* for the specific facts this whole feature exists to recover
|
||||
* (bug-1741) — found live while auditing this gate for task
|
||||
* 6.2's own standby-redirect investigation, not assumed. */
|
||||
case OPCode_notify:
|
||||
case OPCode_update:
|
||||
case OPCode_setpreason:
|
||||
case OPCode_clrpreason:
|
||||
case OPCode_jobStateReport:
|
||||
return 0;
|
||||
default:
|
||||
return -XCE_ERR_NOT_READY;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue