fix(controller): size the config-push barrier for loaded hosts and admit its wait (bug-1914)

The configAck byte-delivery barrier waited 500 ms, below scheduling
delay on an oversubscribed host, so a push to a healthy majority was
rejected with -110 while its already-appended marker still committed.
CONF_PUSH_TIMEOUT_MS is now 2000 ms, the wait holds a commit-wait
admission slot (new commit_blocking_admit/release; a full budget fails
fast with not-ready), and the timeout reply no longer claims the change
was not committed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-04 23:59:29 +00:00
parent 431a6d709e
commit 06e99b9081
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
6 changed files with 101 additions and 4 deletions

View file

@ -641,6 +641,17 @@ int repl_wait_majority_ack(replicator_t *r, uint64_t entry_lsn,
return 0;
}
/* bug-1914: this is a bounded blocking wait on a vtask, so it runs under
* the same admission reservation as a commit WAIT (ha-async-io.md); a
* full budget rejects fast with -XCE_ERR_NOT_READY instead of taking a
* worker reserved for liveness traffic. */
int arc = commit_blocking_admit(r->ce);
if (arc != 0) {
WARN("repl_wait_majority_ack: configAck wait not admitted (rc=%d,"
" push_tag=%016" PRIx64 ")", arc, push_tag);
return arc;
}
struct timespec deadline;
clock_gettime(CLOCK_REALTIME, &deadline);
deadline.tv_sec += (long)(timeout_ms / 1000);
@ -689,6 +700,7 @@ int repl_wait_majority_ack(replicator_t *r, uint64_t entry_lsn,
}
pthread_mutex_unlock(&r->ack_lock);
commit_blocking_release(r->ce);
if (rc == 0)
INFO("repl_wait_majority_ack: quorum reached (ack_op=%u)", ack_op);