myxce/src/include
Rongsong Shen 94f50ce6e1 fix(scheduler,cli): bug-1453/1454/1455/1456 remove dead CA-cert plumbing, fix scheduler HA config bugs
bug-1453: remove unused client-side CA-certificate plumbing. C-side:
drop ca_cert_path from xce_cluster_config_t, do_connect()'s ca_cert
param, --ca-cert flags on worker/scheduler, and controller's cert
population (TLS is server-side only, SSL_VERIFY_NONE everywhere on
the client side already, verified zero SSL_CTX_load_verify_locations
calls in the C tree). Go-side: delete xcecli's self-signed cert
TOFU-pinning flow (cmd/auth/cert/*), CACert field, SetRootCAs/
loadRootCAs, and every call site.

bug-1454: fix xcecli_ctx_t leak in scheduler.c sched_init() — the
unconditional initial ctx_init was never freed before the HA
candidate loop re-initialized it on the first iteration.

bug-1455: sched_init()'s memset(sched, 0, ...) was silently wiping
sched->cluster_cfg that main.c had populated from --peers just before
calling sched_init(), so --peers was always ignored and the scheduler
fell back to the hardcoded localhost:9990 single-host default.
Restructured sched_init() to take cluster_cfg as an explicit parameter
(assigned after the memset) instead of relying on caller-side
ordering with a separate sched_set_cluster_cfg() setter, which is now
removed.

bug-1456: revert an unsafe stack-local xce_client_config_t introduced
while fixing bug-1455 — xcecli_ctx_init() stores that pointer as
ctx->conf and client_failover.c dereferences it for the ctx's entire
life (runtime reconnect), so a per-loop-iteration stack copy would
dangle the moment sched_init() returned. Back to mutating the
caller-owned, process-lifetime config in place.

Verified: full ASAN build (all components), meson test suite 9/9 OK,
manual scheduler testsuite 15/15, Go build/vet/test all pass.
2026-07-20 12:01:10 +00:00
..
xce fix(scheduler,cli): bug-1453/1454/1455/1456 remove dead CA-cert plumbing, fix scheduler HA config bugs 2026-07-20 12:01:10 +00:00
attrs.h improve xkvmgr and testsuite for scheduler 2026-02-26 14:39:12 +08:00
bitset.h - introduce bitset 2026-02-13 11:01:33 +08:00
byteorder.h fix: ha_seed_jitter loop-until-full partial read; byteorder.h musl portability 2026-05-13 14:18:43 +00:00
client.h fix: close bug-1401 ctrlstatus leak, bug-1400 jobsub leak; harden bug-1396 harness 2026-07-03 02:40:52 +00:00
clusterconfig.h fix(ha-bootstrap): restore vcpus@7 field as deprecated UInt32 for config blob backward compatibility 2026-05-29 13:55:23 +00:00
config.h fix(raft-ha-core-safety): close 5.10a — WAL segment rotation + endpoint UAF blocking real snapshot catch-up 2026-07-02 04:11:20 +00:00
configobj.h save works 2026-03-03 16:49:26 +08:00
ctrl_metrics.h feat: P3-7 ctrl_metrics — 7 atomic counters/gauges + descriptor table + persist wiring 2026-05-08 00:04:06 +00:00
dataq.h use nix build & meson & zlog 2025-11-03 18:19:59 +08:00
delay.h fix(lib): normalize delaymgr to one CLOCK_MONOTONIC ms timescale, fixing seconds-task starvation 2026-07-02 03:40:08 +00:00
group.h save works 2026-03-03 16:49:26 +08:00
helper.h feat: fill scheduler controller message gaps 2026-05-12 07:01:52 +00:00
hook.h feat: xce_disable_hook() + _Atomic hook_fn_t + NULL-slot reuse (P1-2a) 2026-05-07 13:55:42 +00:00
htab.h reformat code and job array 2025-11-07 16:14:27 +08:00
idgen.h jobid generate 2025-11-07 18:17:34 +08:00
jobj.h save works 2026-03-02 12:14:30 +08:00
kv.h feat: implement kvmgr_capture_keys for lock-free checkpoint serialization (P0-14a) 2026-05-07 11:07:41 +00:00
kvmgr.h fix(job-array-single-wal-record): close bug-1443's bulk-insert partial-visibility gap 2026-07-16 15:08:02 +00:00
misc.h 1st workable scheduler with resource from controller 2025-12-31 15:50:52 +08:00
myconf.h fix(raft-ha-core-safety): close 5.10a — WAL segment rotation + endpoint UAF blocking real snapshot catch-up 2026-07-02 04:11:20 +00:00
mylock.h feat(libxce-failover): reconnect recovery — ctx ERR->RUN reset + stale wbuf drain (fixes post-failover EINVAL) (task 3.2) 2026-06-17 03:36:24 +00:00
netio.h fix(netio): bug-1447 same-batch endpoint use-after-free in io_worker dispatch 2026-07-18 13:28:04 +00:00
objs.h update controller code 2025-11-05 16:58:57 +08:00
ordq.h pass pend reason back to controller 2025-12-23 15:29:26 +08:00
persist.h feat(job-array-single-wal-record): add live, self-healing apply resource fence 2026-07-15 03:54:20 +00:00
preason.h scheduling using real slots number 2025-12-30 18:13:15 +08:00
qobj.h save works 2026-03-02 12:14:30 +08:00
repl.h feat(ha-term-safety): retire term-0 repl_broadcast live send; carry leader term on replication (task 3.4) 2026-06-22 15:45:14 +00:00
request.h feat(ha-heartbeat-committed-propagation): add xce_ha_heartbeat_req sender (task 1.2) 2026-06-20 11:40:31 +00:00
resobj.h save works 2026-03-03 16:49:26 +08:00
resreq.h fix select eval ctx share 2026-05-07 04:37:18 +00:00
typemap.h feat(job-array-single-wal-record): add compact array push capnp variant 2026-07-14 07:11:51 +00:00
utils.h fix(persist): zero nresvals_to_sched after free_name_val_list 2026-05-20 09:39:07 +00:00
vtaskmgr.h feat(raft-drive-async): peer-control vtask dispatch shim, dormant (task 3.1) 2026-06-26 11:12:04 +00:00
wal_types.h feat(job-array-single-wal-record): add WAL_JOB_ARRAY_SUBMIT record type 2026-07-14 06:47:14 +00:00
wobj.h save works 2026-03-02 12:14:30 +08:00
xcealloc.h scheduling using real slots number 2025-12-30 18:13:15 +08:00
xceapi.h feat(controller-status): libxce xcecli_ctrlstatus any-node read + decode + free (task 3.1) 2026-06-20 05:18:04 +00:00
xcectx.h fix(libxce): bug-1077 ctrlstatus crash from shared reply-union type confusion 2026-06-24 09:44:43 +00:00
xcelimit.h save works 2026-03-03 16:49:26 +08:00
xcelog.h use clang-format to format code 2025-11-25 14:58:09 +08:00
xlist.h support limit 2026-01-12 15:27:54 +08:00
xstring.h save works 2026-03-03 16:49:26 +08:00
xvec.h using xvec related api in scheduler 2026-01-16 18:21:37 +08:00
zarray.h fix(job-array-single-wal-record): close bug-1443's bulk-insert partial-visibility gap 2026-07-16 15:08:02 +00:00