Separate cooperative copy planning from durable checkpoint cadence

This commit is contained in:
2026-11-10 19:28:10 +08:00
parent 8958d835b9
commit 64ed8fe57a
5 changed files with 48 additions and 4 deletions
+13
View File
@@ -986,3 +986,16 @@ A blocked schema upgrade retires its pending open. If the old connection closes
later, that abandoned request aborts in `onupgradeneeded` rather than silently
upgrading after rejection. A fresh adapter can retry once the blocking client has
closed; closing an adapter before its upgrade event also aborts the pending open.
Stream-copy planning separates cooperative task yields from durable preparation
checkpoints. ProjectEngine requests checkpoints on phase changes, the first
nonempty ID allocation, approximately 50ms of elapsed work or 8192 planning
steps at slice boundaries. It also persists the final ready mapping before
entering execution. The planner exposes only a tiny immutable progress read to
make this decision; full checkpoint cloning happens only when saving/returning.
Persistence wait time is excluded from the next interval. Each small planning
slice still yields and checks cancellation. Already-published Roots retain their
normal ordered durability; unsaved work is private preparation with no created
elements or requests. The low-level helper defaults to its prior per-slice
checkpoint policy unless a cadence is requested. Checkpoint/source formats and
resume IDs stay unchanged; a crash/pause can redo only unsaved private planning.