myxce/.kiro/specs/raft-apply-decoupling
Rongsong Shen df4d2fa0ed feat(raft-apply-decoupling): convert job submit to continuation-based commit (task 3.2)
Replace handle_jobsubmit()'s blocking commit call (task 3.1) with a
real async registration against commit_submit_async(). On
FAILED/timeout, replies failure immediately with no job constructed.
On COMMITTED, hands off to a new pending-apply registration
(persist_register_pending_apply) for the ordered apply pump (task
6.1, not yet built) to consume -- does not apply or reply directly,
per design.

Deviates from design.md's stated integration site: appends via the
same ha_primary_log_append/persist_wal_async primitive the RETAIN-fact
path already uses and calls commit_submit_async directly on
p->repl.ce, bypassing repl_wait_majority_ack/repl_submit_majority_commit
in repl.c. Verified safe -- majority-ack detection is driven entirely
by (ce, lsn) events inside the commit engine, agnostic to which
wrapper registered the continuation -- but narrows the reusable
primitive design.md intended; documented in tasks.md.

Deletes (not preserves-dead) task 3.1's bug-1408 notification fix --
apply_committed_entry()'s WAL_JOB_SUBMIT case (task 2.2) already
fires the notification per-entry, immune to the batch-suppression
class bug-1408 fixed.

IMPORTANT: no live path applies a successfully-committed job
submission until task 6 lands (only restart replay does) -- every
successful submission commits durably but gets zero reply until
then. This commit range must not be soak-tested or deployed against
live traffic before task 6 completes.
2026-07-04 05:35:35 +00:00
..
brief.md docs: promote raft-apply-decoupling spec family from /kiro-discovery 2026-07-03 02:41:11 +00:00
design.md feat(raft-apply-decoupling): commit engine resolve primitive + majority-ack wiring (task 1.2) 2026-07-03 09:03:50 +00:00
facts-in-raft.md docs: promote raft-apply-decoupling spec family from /kiro-discovery 2026-07-03 02:41:11 +00:00
requirements.md docs(raft-apply-decoupling): add requirements, design, and task plan 2026-07-03 07:05:28 +00:00
research.md docs(raft-apply-decoupling): add requirements, design, and task plan 2026-07-03 07:05:28 +00:00
spec.json docs(raft-apply-decoupling): add requirements, design, and task plan 2026-07-03 07:05:28 +00:00
tasks.md feat(raft-apply-decoupling): convert job submit to continuation-based commit (task 3.2) 2026-07-04 05:35:35 +00:00