Skip to content

fix: recovery, boot, and DDL cleanup - #441

Merged
farhan-syah merged 7 commits into
mainfrom
fix/recovery-ddl-cleanup
Oct 30, 2026
Merged

farhan-syah merged 7 commits into
mainfrom
fix/recovery-ddl-cleanup

Conversation

@farhan-syah

Copy link
Copy Markdown
Member

Fixes recovery, boot, and DDL cleanup bugs found on main.

Fixes

Tests

Known open defect

A node killed before its first post-restart checkpoint replays a longer WAL tail on each restart. Boot completes, but recovery time grows.

Closes #431
Closes #432
Closes #433
Closes #438
Closes #439
Closes #337

Describing a statement planned its sequence functions against the live
counters, so a Describe consumed a value the execution then skipped.
Plan a Describe in a describing mode in which sequence functions check
that their sequence exists and resolve to a typed placeholder, without
advancing a counter or recording a session value.
A descriptor drain has no expiry, so a DDL that failed, timed out, or
was cancelled after starting a drain left the descriptor drained. Add
a drain hold that owns each drain from before its start is proposed
and ends it on any exit short of the applying entry.

Abandoning a DDL preparation lease now cancels its pending DDL record
before releasing it, including when the proposer never learned the
outcome of its own pending propose, and a cancelled pending record
ends the drains its reserved alters started. A drain end that cannot
be proposed is recorded through diagnostics.
The boot integrity check looked up RLS policy and change stream
collections by tenant and name only, so a policy on a collection in a
named database reported a dangling reference and refused every boot.
Resolve them by database, tenant, and bare name, and treat a
qualifier for another database as dangling.
Reclaim after a collection drop left the columnar checkpoint
generations on disk. Reclaim them for every collection whose rows live
in the columnar engine, resolving the live generation through the same
manifest reader the core uses.
…tted writes

Data Plane cores drain no request until their WAL replay ends, and a
request's deadline runs from its dispatch, so boot steps that
dispatched early timed out against a slow replay. Wait for every
core's replay, with no time bound, before any boot step that
dispatches, and gate metadata post-apply hooks on a new
DataPlaneReplay phase.

A committed write is never expired by its core, so its Control Plane
wait carries no deadline either: array-sync applies and funnel writes
wait for the real answer instead of reporting a write the core still
applies as not applied.
@farhan-syah farhan-syah added the run-ci Opt this PR into the full test suite; re-add to force a re-run label Oct 30, 2026
Bump the 0.136 series of the pinned dependency family to 0.136.5 and refresh two patch-level dependencies.
@farhan-syah
farhan-syah merged commit ab540e9 into main Oct 30, 2026
6 checks passed
@farhan-syah
farhan-syah deleted the fix/recovery-ddl-cleanup branch October 30, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment