myxce/src/controller
Rongsong Shen 762c6f1883
fix(controller): refuse replicated WAL writes before this boot's recovery (bug-1920)
A restarted standby accepts the primary's connection during its startup
delay, before persist_recover runs. Catch-up entries written into the
un-recovered persist_t opened seg-...0001 with O_TRUNC and rewrote it,
and after recovery the stale fd kept filing new LSNs under that segment
name. The primary's filename-ordered streamer then skipped them, so a
standby needing that range never caught up and commits stalled.

persist_wal_write_replicated now returns -EBUSY until recovery completes
(the bug-1416 recovery_complete gate). ha_apply_wal_catchup_entry and
ha_handle_snapshot_chunk drop pre-recovery traffic without ACK or NACK.
Catch-up streams from min(NACK-derived join position, standby report),
and the streamer warns when a non-empty range yields no entries.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-04 12:02:37 +00:00
..
include feat(controller): compute the LSF CPU peak and efficiency fields (bug-1736) 2026-10-02 04:14:35 +00:00
testsuite fix(controller): refuse replicated WAL writes before this boot's recovery (bug-1920) 2026-10-04 12:02:37 +00:00
apiserver.c fix(schema): rename struct Data -> XceData to unshadow capnp builtin blob type 2026-07-22 09:22:04 +00:00
CLAUDE.md fix(controller): raft_cb_persist must deny vote and roll back state on persist failure (bug-1684) 2026-08-25 07:49:49 +00:00
cluster.c feat(controller-peers-env-fallback): route the controller's two identity loops through the shared lookup (task 2.1) 2026-10-03 05:54:48 +00:00
commit.c fix(controller): stop a failed test from hanging the unit suite (bug-1429); mkstemp for upgrade temp file (bug-1861) 2026-09-25 13:15:03 +00:00
config_repl.c fix(controller): refuse replicated WAL writes before this boot's recovery (bug-1920) 2026-10-04 12:02:37 +00:00
config_repl.h feat(controller): OPCode_probeConfigTag handler with Request envelope reply (bug-1506) 2026-08-10 10:00:08 +00:00
ctrl_metrics.c feat: P3-7 ctrl_metrics — 7 atomic counters/gauges + descriptor table + persist wiring 2026-05-08 00:04:06 +00:00
ctrlstatus.c fix(controller): cold start elects in ~1.7 s, not ~10 s; ctrlstatus appliedLsn on the primary (bug-1879, bug-1878) 2026-09-28 07:35:45 +00:00
dataex.c fix(scheduler,controller): worker resource values always display as 0.00 (bug-1568) 2026-08-17 10:35:34 +00:00
egress.c feat(ha-convergence-recovery): commit-gated scheduler egress — submit_lsn tagging + watermark gate (task 1.2) 2026-06-14 02:33:36 +00:00
ha.c fix(controller): refuse replicated WAL writes before this boot's recovery (bug-1920) 2026-10-04 12:02:37 +00:00
ha.h fix(controller,lib): decide each PreVote round once and promote only with this election's votes (bug-1915) 2026-10-04 09:14:38 +00:00
ha_convergence.c fix(controller): offload demotion convergence and catch-up streaming by default (bug-1450, bug-1451) 2026-09-27 05:46:09 +00:00
job.c feat(controller): compute the LSF CPU peak and efficiency fields (bug-1736) 2026-10-02 04:14:35 +00:00
join.c fix(controller): a worker join that fails its commit barrier leaves nothing bound (bug-1728) 2026-09-27 05:48:49 +00:00
main.c feat(controller-peers-env-fallback): refuse an env-supplied peers list without the controller's own name (task 2.4) 2026-10-03 06:29:01 +00:00
meson.build fix(controller): probe a late-joining standby at once so its catch-up starts without waiting a heartbeat (bug-1913) 2026-10-03 23:18:10 +00:00
misc.c feat(controller): compute the LSF CPU peak and efficiency fields (bug-1736) 2026-10-02 04:14:35 +00:00
myapp.c fix: spurious errors/warnings from a pc13v HA deploy (bug-1872..1877) 2026-09-28 04:35:19 +00:00
myconf.c fix(config): serialize load_primary_config against concurrent invocations (bug-1476) 2026-07-28 08:13:54 +00:00
opget.c refactor(controller,xceadmin): drop generic Resource.unit, hardcode bytes for maxmem 2026-08-13 08:27:16 +00:00
opupd.c fix(controller): resource hooks only carry values the controller accepted (bug-1583) 2026-09-27 03:19:17 +00:00
persist.c fix(controller): refuse replicated WAL writes before this boot's recovery (bug-1920) 2026-10-04 12:02:37 +00:00
queue.c fix(controller): a queue added by a live config upgrade exists without a restart (bug-1469) 2026-09-27 06:05:26 +00:00
repl.c fix(ha): close permanent quorum-loss deadlock on log-conflicted standby (bug-1479) 2026-07-29 04:11:32 +00:00
reply.c fix(persist): zero nresvals_to_sched after free_name_val_list 2026-05-20 09:39:07 +00:00
resources.c update controller code 2025-11-05 16:58:57 +08:00
resync.c fix(controller): persist a failed job's finish_time through WAL_JOB_FAIL (bug-1747) 2026-09-26 09:33:55 +00:00
sched.c fix(bug-1737): scheduler can never learn a job finished successfully 2026-08-31 04:20:27 +00:00
slowlane.c fix(controller): offload demotion convergence and catch-up streaming by default (bug-1450, bug-1451) 2026-09-27 05:46:09 +00:00
startup_validation.c fix(controller): restored-but-stale raft term permanently blocked re-election after restart (bug-1695) 2026-08-25 16:11:37 +00:00
task.c save works 2026-03-04 18:18:53 +08:00
worker.c fix(controller): resource hooks only carry values the controller accepted (bug-1583) 2026-09-27 03:19:17 +00:00