myxce/src
lei.chen f2993d1efc fix(controller): trim config versions by ns mtime; unique test tmpdir
Two pre-existing failures (2026-05-13, commit 491c255) surfaced by the
controller unit-test suite (1070 Tests 2 Failures), both in the config
version storage path:

1. conf_trim_old_versions sorted cluster.bin.* versions by
   second-granularity st_mtime. Versions saved within the same second
   (rapid replication, or the trim test's 15ms-spaced saves) tie, glibc's
   stable mergesort keeps creation order, and the newest (current-pointer)
   entry lands at the protected keep_n index — so nothing is pruned and
   keep_n+1 files remain. Store st_mtim (struct timespec) and compare
   tv_sec then tv_nsec.

2. cr_setup() built its tmpdir path from (pid, time(NULL)) at second
   granularity; a Unity assertion failure longjmps past cr_teardown(),
   leaking the dir, and the next test (same pid+second) silently inherited
   the leftover conf/current — cascading a second failure
   (test_conf_get_saved_tag_no_config read a real tag instead of 0). Add a
   per-invocation counter to the path so no two tests share a dir.

Verified: nix develop ./src --command bash src/tools/xce-build.sh all →
meson 9/9 Ok 0 Fail, controller 1070 Tests 0 Failures, xceadmin 172
passed, frontend Go all ok.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-01 03:34:55 +00:00
..
autoscaler fix: nix build environment fixes 2026-07-24 07:03:18 +00:00
configs fix(admin-config-tool): resolve xceadmin config build warnings 2026-07-23 09:10:14 +00:00
controller fix(controller): trim config versions by ns mtime; unique test tmpdir 2026-08-01 03:34:55 +00:00
docs docs(deployment): note WAL/snapshot retention is automatic 2026-07-31 08:48:41 +00:00
frontend Merge remote-tracking branch 'origin/working' into working 2026-08-01 03:02:49 +00:00
include feat(raft-adapter-conformance): add term field to ReplConfigPushReply schema 2026-07-29 09:09:56 +00:00
lib feat(config-upgrade-snapshot): live config-upgrade soak infra + fix bug-1468/bug-1469 (task 8.6) 2026-07-25 15:48:20 +00:00
nixSupport fix(nix): pin capnpc source to immutable commit, not mutable main ref 2026-07-24 08:25:38 +00:00
scheduler merge 2026-07-23 12:35:10 +08:00
schema feat(raft-adapter-conformance): add term field to ReplConfigPushReply schema 2026-07-29 09:09:56 +00:00
tools fix: nix build environment fixes 2026-07-24 07:03:18 +00:00
worker merge 2026-07-23 12:35:10 +08:00
xceadmin wip(admin-config-tool): task 6.3 HA E2E test (blocked, flaky primary-push) 2026-07-31 08:09:36 +00:00
flake.lock fix librtti package leak issue 2026-07-27 15:31:50 +08:00
flake.nix chore(nix): drop redundant capnpc override from flake.nix overlay 2026-08-01 03:04:10 +00:00
meson.build feat(admin-config-tool): wire xceadmin into meson + nix build 2026-07-22 10:46:45 +00:00
meson.options Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00