feat(ha-commit-durability): add --wal-sync-ms flush-cadence override (task 1.1)

This commit is contained in:
Rongsong Shen 2026-06-18 04:46:01 +00:00
parent 80bb1d766e
commit 1ca2d640cb
7 changed files with 206 additions and 0 deletions

View file

@ -163,6 +163,11 @@ int myapp_run(myconf_t *myconf)
: "controller";
persist_config_t pcfg = persist_config_defaults();
/* --wal-sync-ms flush-cadence override (0 = keep the persist
* default). Applied before persist_init so persistence starts at
* the requested cadence (ha-commit-durability Req 3.1). */
persist_config_set_wal_sync_ms(&pcfg, myconf->wal_sync_ms);
persist_set_workdir(&c.persist, workdir, name);
rc = persist_init(&c.persist, &pcfg, &c);
if (rc != 0) {