myxce/src/lib
Rongsong Shen 40c2351578 fix(client): bug-1436 count-aware failover macro for xce_get-family calls
xcecli_joblist/reslist/workerlist/resval/jobinfo return a non-negative ROW
COUNT on success (rc = getreply.nrows), not a 0/status code. They were
wrapped in XCECLI_FAILOVER_CALL, which unconditionally classifies the raw
return value against fixed constants (E_XCE_* and POSIX errno magnitudes
accepted in either sign) — a row count that happens to equal one of those
constants (e.g. exactly 111 jobs == ECONNREFUSED) was silently
misclassified as a transport failure, forcing a spurious
xce_failover_rotate() on every call with that exact count. In
/xce-test-ha's arithmetic progression (3 + 3*round) this hit at round 36,
burning the retry budget on self-inflicted churn until it coincided with
a genuine transient and surfaced a real ECONNRESET to the caller.

Add XCECLI_FAILOVER_CALL_COUNT: only enters the retry/classify loop when
EXPR's raw result is negative; any non-negative result (0 or a genuine
row count of any magnitude) is unconditionally success. Switch the five
xce_get-family wrappers to it. Verified via 40-round sequential and
40-round chaotic HA soak past round 36, zero committed-job loss.
2026-07-13 07:18:52 +00:00
..
raft fix(ha): bug-1421 close term-desync AE-reject blindspot in HA election 2026-07-09 11:56:46 +00:00
testsuite feat(ha): reference-counted ha_elect_ctx_t lifecycle (ha-elect-ctx-lifecycle) 2026-07-12 04:25:42 +00:00
bitset.c - introduce bitset 2026-02-13 11:01:33 +08:00
CLAUDE.md enhance xce-build skill 2026-05-30 08:13:59 +08:00
client.c fix(client): bug-1436 count-aware failover macro for xce_get-family calls 2026-07-13 07:18:52 +00:00
client_failover.c fix(libxce-failover): correct endpoint reconnect on rotate — re-bind iomgr + re-arm handlers (fixes endpoint_connect SEGV during live failover) 2026-06-17 06:53:46 +00:00
client_internal.h fix(client): bug-1436 count-aware failover macro for xce_get-family calls 2026-07-13 07:18:52 +00:00
cluster.c refactor: consolidate parse_peers into xce_parse_peers in libxce 2026-05-08 07:06:57 +00:00
configobj.c save works 2026-03-04 18:18:53 +08:00
dataq.c reformat code and job array 2025-11-07 16:14:27 +08:00
delay.c fix(lib): normalize delaymgr to one CLOCK_MONOTONIC ms timescale, fixing seconds-task starvation 2026-07-02 03:40:08 +00:00
group.c save works 2026-03-04 18:18:53 +08:00
helper.c fix(ha): fix config replication to standbys; add replConfigPush handler 2026-06-01 05:56:16 +00:00
hook.c fix bug-1060 bug-1067 2026-06-24 17:05:43 +08:00
htab.c docs: mark Phase 6 complete in phase6-scheduler-integration-plan 2026-04-30 07:17:32 +00:00
idgen.c jobid generate 2025-11-07 18:17:34 +08:00
jobj.c save works 2026-03-06 18:20:30 +08:00
kv.c feat: implement kvmgr_capture_keys for lock-free checkpoint serialization (P0-14a) 2026-05-07 11:07:41 +00:00
kvmgr.c feat: implement kvmgr_capture_keys for lock-free checkpoint serialization (P0-14a) 2026-05-07 11:07:41 +00:00
meson.build feat(ha): reference-counted ha_elect_ctx_t lifecycle (ha-elect-ctx-lifecycle) 2026-07-12 04:25:42 +00:00
misc.c 1st workable scheduler with resource from controller 2025-12-31 15:50:52 +08:00
mylock.c - use librtti 2026-02-05 17:21:27 +08:00
netio.c feat(ha): reference-counted ha_elect_ctx_t lifecycle (ha-elect-ctx-lifecycle) 2026-07-12 04:25:42 +00:00
ordq.c pass pend reason back to controller 2025-12-23 15:29:26 +08:00
preason.c support limit 2026-01-12 15:27:54 +08:00
qobj.c save works 2026-03-05 16:03:37 +08:00
request.c fix(ha): close two independent chaotic-failover bugs — term-desync liveness stall and bug-847 WAL batch payload loss 2026-07-08 15:21:24 +00:00
resobj.c minor improve 2026-04-14 12:52:40 +08:00
resreq.c fix front end issues 2026-05-01 21:22:45 +08:00
rusage.peg fix typo of perflag && reformat .peg 2026-02-09 10:58:30 +08:00
section.peg docs: mark Phase 6 complete in phase6-scheduler-integration-plan 2026-04-30 07:17:32 +00:00
threshold.c reformat code and job array 2025-11-07 16:14:27 +08:00
utils.c fix(libxce): xce_strerror_r global-buffer-overflow on HA error codes (utils.c) 2026-06-20 10:13:21 +00:00
vtaskmgr.c fix(libxce): endpoint reference count — kill teardown-vs-dispatch UAF (bug-1298, task 5.8) 2026-06-30 14:24:47 +00:00
window.c reformat code and job array 2025-11-07 16:14:27 +08:00
wobj.c add kiro skills 2026-05-21 03:41:57 +00:00
wrap.c reformat code and job array 2025-11-07 16:14:27 +08:00
xce_resreq.peg docs: mark Phase 6 complete in phase6-scheduler-integration-plan 2026-04-30 07:17:32 +00:00
xce_select.c fix: sel_key_cmp_fn padding-byte mismatch in kvtab lookups 2026-05-12 09:53:59 +00:00
xce_select.peg docs: mark Phase 6 complete in phase6-scheduler-integration-plan 2026-04-30 07:17:32 +00:00
xcealloc.c 1st workable scheduler with resource from controller 2025-12-31 15:50:52 +08:00
xceapi.c fix(libxce): bug-1077 ctrlstatus crash from shared reply-union type confusion 2026-06-24 09:44:43 +00:00
xcectx.c feat(raft-drive-async): bound peer connect (O_NONBLOCK+poll), close tasks 1.3/1.4/1.5 2026-06-26 07:10:53 +00:00
xcelimit.c minor improve 2026-04-14 12:52:40 +08:00
xlist.c support limit 2026-01-12 15:27:54 +08:00
xstring.c docs: mark Phase 6 complete in phase6-scheduler-integration-plan 2026-04-30 07:17:32 +00:00
xvec.c using xvec related api in scheduler 2026-01-16 18:21:37 +08:00
zarray.c fix: use acquire/release ordering for inuse atomic ops in xzarray (P0-2) 2026-05-07 09:51:37 +00:00