Files
seaweedfs/seaweed-block/docs/persistence.md
T
Ping Qiu 2f07922234 P8-P12: local data process, lineage protocol, data-sync, recovery-execution, single-node surface, replicated durable slice
* storage: local data process — admission, flusher, and experimental extent-direct backend

Names the local data process (read / write / flush / checkpoint /
recover on one node) as a bounded institution with an explicit
crash model and carry-forward boundaries. Adds WAL admission
backpressure, a background flusher that drains WAL entries into
the extent, and an experimental metadata-only backend alongside
the regular WAL+extent backend. Both backends implement the same
LogicalStorage interface and pass the shared contract test suite.

Admission controller ports the battle-tested watermark algorithm
from the in-production engine: 0.7 soft / 0.9 hard, counting
semaphore for concurrent writers, deadline governing the whole
Acquire call, flusher wakeup via a dedicated urgent-notify seam.
Defaults intentionally absent at the admission layer — callers
set them explicitly, same contract as the source.

Flusher processes the entire dirty-map snapshot per cycle; the
on-disk checkpoint is bumped to the highest LSN verified-and-
flushed. Compare-and-delete cleanup preserves concurrent writes
that bumped an LBA's LSN after the snapshot was taken.

The experimental backend (core/storage/smartwal) writes data to
the extent first and appends only a small metadata record to a
ring. Reads bypass the ring entirely. A group committer batches
concurrent fsyncs.

Adopting the extent-direct backend as the default would be a
separate decision; this change only makes it available behind the
same interface.

Docs: docs/local-data-process.md names the institution, its crash
windows per backend, and the explicit carry-forward list.

* protocol: close recovery around explicit lineage at every layer

Every recovery start now carries (epoch, endpointVersion, sessionID,
targetLSN) — a single tuple that travels from engine decision through
adapter command, transport wire, replica ingress, and back via ack.
Each layer rejects messages whose lineage doesn't match the contract
it currently believes is active, so stale work cannot leak between
layers.

Engine: probe / catch-up / rebuild commands carry epoch +
endpointVersion. ProbeFailed and RecoveryFactsObserved are now
treated as lineage-bearing observations and dropped if stale.
Same-observation reorder fix is preserved and extended so reversed
probe/facts arrival still converges. Zero-valued epoch /
endpointVersion are rejected at event ingestion with a clear trace
key, not silently at the wire.

Adapter: each Start* command mints a fresh process-wide sessionID
and feeds it synchronously through the executor and engine, so
every outbound mutation can carry it.

Transport: invalidated sessions are canceled — the active session
holds its conn, and InvalidateSession closes the conn directly so a
goroutine parked in ReadMsg unblocks immediately. Recovery conns
have explicit deadlines on every write/read. Mutating wire frames
(ShipEntry, RebuildBlock, RebuildDone, BarrierReq) carry the full
lineage tuple. Replica ingress rejects stale lineage and closes the
connection without partial application.

Rebuild: blocks now apply with the engine's frozen targetLSN
instead of a placeholder, so a future LSN-aware ApplyEntry guard
won't silently drop rebuild data. The primary returns success only
after reading BarrierResp from the replica with the actually
achieved frontier — never on EOF, timeout, or a non-terminal phase
ack.

Tests: adversarial coverage at every layer — stale transport-epoch
events at the engine, stale callback drops at the adapter, mid-
session invalidation interrupting a blocked ack read at the
transport, stale wire-lineage rejection at the replica, and a
calibration handoff/stale-probe scenario.

README adds a roadmap table naming what each upcoming phase closes
and what it does not, so the project's bounded-closure model is
visible to readers.

* transport: institutionalize the data-sync layer

Names the bounded data-sync institution: catch-up byte movement,
rebuild byte movement, barrier exchange, achieved-frontier report,
and the lineage gate that fails closed on stale or overlapping
traffic. The institution does not own recovery classification,
session lifecycle policy, failover decisions, or operator
publication — those belong to later phases.

Splits transport into per-responsibility files so the boundaries
are visible on the page:

  executor.go         — session lifecycle + probe (observation only)
  catchup_sender.go   — primary-side catch-up byte movement
  rebuild_sender.go   — primary-side rebuild byte movement
  barrier.go          — typed BarrierResponse and helpers
  replica.go          — per-message-type handlers, lineage gate

Catch-up and rebuild each keep their own ship loop. The two
protocols look similar today but have different terminators (barrier
vs RebuildDone) and shouldn't share a hidden implementation that
would mask their divergence later.

BarrierResponse replaces the bare 8-byte uint64 wire reply with a
typed struct {AchievedLSN uint64}. The replica reports what Sync()
actually returned; the primary returns that value verbatim. Short
or unexpected payloads now fail closed instead of silently
fabricating a frontier.

Replica handler dispatch extracted into named per-message methods
(handleShipEntry, handleProbeReq, handleRebuildBlock,
handleRebuildDone, handleBarrierReq), each fronted by the same
acceptMutationLineage gate.

Five new fail-closed tests prove the institution's negative space:

  - overlapping sessions: higher lineage bumps active state, older
    session's in-flight frames are rejected
  - primary mid-rebuild crash: subsequent higher-lineage session
    converges, achieved frontier reflects the new session
  - replica disconnects before BarrierResp: primary surfaces failure
    with no fabricated AchievedLSN
  - stale Ship after newer Rebuild: cross-message-type lineage
    rejection
  - probe during rebuild: probe is observation, does not disturb
    activeLineage

Plus a typed-barrier roundtrip + short-payload-fails-closed test.

docs/data-sync-institution.md names what this layer owns, what it
does not, and the explicit carry-forward to later phases.

* chore: remove committed artifact .commitmsg

* engine, adapter, transport: close recovery-execution lifecycle

Admits one bounded recovery-execution institution around
engine-issued recovery commands: engine command → prepared →
real started or bounded timeout → cancel/invalidate/fail/complete
→ terminal close truth. Every stale or delayed callback fails
closed under lineage without reviving dead semantic truth.

Scaffolding (admitted earlier in this working session):

  - SessionPrepared event splits "we accepted the contract" from
    "runtime actually began execution". A dial failure or
    invalidate-before-start no longer looks identical to a real
    running session.
  - OnSessionStart callback + SetOnSessionStart on CommandExecutor
    tie SessionStarted to real execution start, not command
    issuance. Transport emits it via signalSessionStart after
    attachConn succeeds, with a registry recheck so an invalidate
    between attach and signal drops the callback.
  - startTimeout watchdog in the adapter arms on Start* only, fires
    only if engine-state still matches (sessionID == q.sessionID
    AND Phase == PhaseStarting), clears on real start or terminal
    close. An old timer racing a newer session records fire_noop,
    not a spurious failure.

Closure (this pass):

Engine trace detail enriched so ignored transitions name the
current phase ("current phase=failed") and session ID mismatch
traces distinguish older-session vs newer-session vs no-active-
session via phaseMismatchDetail(). Operators debugging a stale
callback can tell at a glance why it was rejected.

Adapter watchdog now records structured lifecycle events via
WatchdogLog(): arm, clear_started, clear_closed, supersede, fire,
fire_noop. Not an operator surface — execution evidence for tests
and diagnostic dumps.

New tests covering the required proof set:

  engine/apply_test.go:
    - TestV3_Terminal_DelayedFailureAfterCompletionIgnored
    - TestV3_Terminal_DuplicateCompletedIgnored
    - TestV3_Terminal_DuplicateFailedIgnored
    - TestV3_Terminal_InvalidPhaseTransitionsLeaveStateUnchanged

  adapter/watchdog_test.go (new):
    - TestWatchdog_ClearedByRealStart
    - TestWatchdog_ClearedByImmediateClose
    - TestWatchdog_OldTimerCannotFailNewSession
    - TestWatchdog_InvalidateBeforeStart_NoFalseStartNoFalseSuccess

  transport/transport_test.go:
    - TestTransport_Lifecycle_LateCompletionAfterInvalidateDropped

docs/recovery-execution-institution.md updated with per-scenario
proof table, separate watchdog contract table, and an explicit
"What is NOT proven here" section naming carry-forward for
multi-replica coordination, policy-driven invalidation, operator
surfaces.

Non-identity invalidation remains out of scope: the engine still
emits InvalidateSession only from identity-truth handlers
(assignment, removal). A SessionInvalidated reducer exists without
an emitter as forward-compatibility for the topology phase.

* ops: bounded single-node product surface

Makes the existing inspection endpoints read as one coherent
single-node product surface: self-describing, bounded, and
tested against its honesty rules.

Added two endpoints so the surface is product-shaped rather than
four scattered reads:

  GET /          surface map — scope + endpoints + read-only note
  GET /diagnose  bounded summary over projection + trace tail +
                 watchdog counters; full fidelity stays at the
                 dedicated endpoints

Every field exposed by /diagnose is derivable from the existing
State.Snapshot() — projection, trace, watchdog log. The surface is
a mirror over accepted lower truth, never a new authority path.

No HTTP mutation surface. Any mutation verb on any path still
returns 501. The surface-index test rejects cluster-shaped
vocabulary ("cluster", "failover", "promotion", "topology
authority", "rf3") in the self-description — an early draft of
the root endpoint's note used "Cluster-shaped control" and the
test caught it; the note was reworded positively.

Proof (core/ops/surface_test.go):

  - TestSurfaceIndex_SelfDescribing: GET / lists exactly the paths
    the mux wires, each with a non-empty Owns description.
  - TestSurfaceIndex_WordingIsSingleNode: the surface declares
    itself single-node and contains no cluster-shaped vocabulary.
  - TestDiagnose_EmptyStateIsHonest: an empty-state /diagnose
    returns zero/empty values, never fabricated fields.
  - TestDiagnose_OnlyReadsLowerTruth: the /diagnose field set is
    restricted to fields derivable from Snapshot(); any future
    addition that isn't sourced from lower truth trips this test.
  - TestSurfaceMutations_IncludesRootAndDiagnose: every mutation
    verb on / and /diagnose returns 501.

New docs/single-node-surface.md names what the surface owns, what
it does not, and the explicit carry-forward: replicated status to
P12, topology/failover control to P14, operator governance surface
to P15.

README gets a "Single-node product surface" section linking to
the new doc. docs/bootstrap-validation.md updated to reference
/ and /diagnose, and to drop the "Phase 05" label — the doc is
now positioned as the CLI/endpoint reference, with the
product-shape view living in single-node-surface.md.

Also rolls in a small docs/recovery-execution-institution.md note
clarifying that the adapter watchdog's engine-state pre-check is
advisory; the engine phase guards remain the authoritative last
gate. This keeps a dual-layer guard visible to future maintainers
so they don't collapse the two into one convenience check.

* adapter: bounded replicated durable slice — handoff mechanism + fencing proof

Proves the first product capability beyond single-node operation:
given an external reassignment (epoch+1), the engine clears any
in-flight session, invalidates stale lineage, re-probes the
replica, decides catch-up or rebuild, and converges — while the
old primary's stale execution is rejected at every layer by the
lineage gate.

No new engine or transport mechanism was required. The lower
institutions (lineage gate, session lifecycle, data sync) compose
into a working handoff. P12's deliverable is the product-level
proof that this composition works.

Added adapter.OnRemoval(replicaID, reason) so the old primary's
demotion is expressible from outside the package.

Four multi-adapter handoff tests — two real adapters + two real
transport executors sharing one replica listener, no mocks:

  TestHandoff_OldPrimaryToNewPrimary_Converges
    A (epoch=1) reaches healthy; B (epoch=2) probes, recovers,
    converges. Replica data matches B.

  TestHandoff_StaleOldPrimaryTraffic_Rejected
    After B's epoch=2 traffic establishes lineage on the replica,
    stale epoch=1 frames are rejected at the data plane.

  TestHandoff_RejoinAfterNewPrimary_DataConsistent
    Every LBA the new primary wrote is byte-identical on the
    replica after handoff.

  TestHandoff_OldPrimaryDemoted_NoResurrection
    After ReplicaRemoved, late callbacks from the old executor
    cannot resurrect a healthy projection.

Durability claim (explicitly bounded): all writes the new primary
successfully barrier-ack'd are durable on the replica. Writes
in-flight on the old primary at reassignment that weren't ack'd
may be lost. The new primary's truth is authoritative.

Known limitation documented: if the new primary finds the replica
already caught up (R >= H), no mutating traffic establishes the
new epoch on the replica. Stale old-epoch traffic with a higher
sessionID could land. Low practical risk; deferred to P14 as a
proactive-fence concern.

docs/replicated-slice.md names what P12 proves (one bounded
failover/rejoin mechanism), what it doesn't (who decides primary,
when to fail over), and the carry-forward to P13/P14/P15.

* P8-P12: reconcile working tree with accepted phase closures

Reconciles the working tree so all accepted P10, P11, and P12
closures are present and consistent — no regressions, no stubs,
no doc/code mismatches.

P10 watchdog observability restored:
  - armStartWatchdog/clearStartWatchdog record structured events
    (arm, clear_started, clear_closed, supersede, fire, fire_noop)
    into the adapter's watchdogLog field
  - WatchdogLog() returns real data, not a nil stub
  - clearStartWatchdog takes a WatchdogKind reason parameter so
    clear-by-start is distinguishable from clear-by-close
  - watchdog_test.go assertions are full strength — no skip-if-nil
    guards

P10 engine trace detail restored:
  - phaseMismatchDetail() helper distinguishes older-session,
    newer-session, and no-active-session cases
  - all session lifecycle handlers use enriched traces:
    "current phase=failed" instead of "not in active phase"
  - four terminal-lifecycle proof tests restored:
    DelayedFailureAfterCompletion, DuplicateCompleted,
    DuplicateFailed, InvalidPhaseTransitionsLeaveStateUnchanged

P11 single-node product surface restored:
  - GET / (self-describing surface map) and GET /diagnose (bounded
    summary) re-added to handlers.go and server.go
  - surface_test.go recreated with all five honesty proofs
  - server_test.go mux and mutation paths include / and /diagnose
  - README endpoint list names all six read-only endpoints
  - README "Single-node product surface" and "Replicated durable
    slice" sections restored with doc links
  - bootstrap-validation.md endpoint table and example curl block
    include / and /diagnose; header repositioned as CLI/endpoint
    reference with link to single-node-surface.md

P12 fixes preserved:
  - replicated-slice.md route statement narrowed to distinguish
    recovery-needed handoff (fenced) from R>=H (NOT fenced)
  - TestHandoff_OldPrimaryDemoted_NoResurrection strengthened:
    uses SetStepDelay to keep session active during removal, then
    injects late OnSessionStart + OnSessionClose(success) — both
    rejected
  - "stops receiving assignments" wording corrected to "receives
    explicit ReplicaRemoved"
  - adapter.OnRemoval() public API added
  - transport.BlockExecutor.SetStepDelay() exposed for test control
2026-04-16 15:23:29 -07:00

12 KiB

Persistence

This doc describes the single-node persistence backend in core/storage/. It is one implementation behind the LogicalStorage interface; the in-memory BlockStore is the other. Both satisfy the same contract; tests run against both via a shared factory table so a new backend slots in without test duplication.

For the broader institutional view of read / write / flush / checkpoint / recover as one bounded execution institution with an explicit crash model and named carry-forward boundaries, see docs/local-data-process.md.

What this proves

  1. Acked writes survive crash. A write whose enclosing Sync() returned with no error is recoverable after a process kill or clean stop. Verified by TestWALStore_AckedWritesSurviveSimulatedCrash which simulates a kill by dropping the file handle without going through Close().
  2. Recovery is deterministic. Calling Recover() twice on the same on-disk state yields identical results. Verified by TestWALStore_RecoverIsIdempotent.
  3. Pre-Sync writes can be lost but never corrupted. A write that completed but was not followed by a successful Sync() may or may not be present after recovery. If absent, the LBA reads as zeros. If present, it reads as the bytes that were written — never some other LBA's bytes, never garbage.
  4. Boundaries report current truth. Boundaries() returns the live (R, S, H) triple — synced LSN, retained-window tail, and newest written LSN — so the engine can classify recovery without the storage taking a position on what those numbers mean.

What this does NOT prove

These are intentional scope choices. The scope statement (sparrow --help) lists them as not supported:

  • Distributed durability across nodes. This backend is single-node.
  • Replicated persistence. The core/transport primary→replica path still operates on in-memory stores in the demos and calibration; WAL persistence is admitted as a backend, not adopted as the default everywhere.
  • SmartWAL semantics. SmartWAL is a future implementation behind the same interface; not part of this slice.
  • Compaction. The WAL is bounded by configured size, but there is no background defragger that rewrites old extents.
  • Concurrent writer per LBA. The interface assumes serialized writes per LBA.

The interface

type LogicalStorage interface {
    Write(lba uint32, data []byte) (lsn uint64, err error)
    Read(lba uint32) ([]byte, error)
    Sync() (stableLSN uint64, err error)
    Recover() (recoveredLSN uint64, err error)
    Boundaries() (R, S, H uint64)
    NextLSN() uint64
    NumBlocks() uint32
    BlockSize() int
    AdvanceFrontier(lsn uint64)
    AdvanceWALTail(newTail uint64)
    ApplyEntry(lba uint32, data []byte, lsn uint64) error
    AllBlocks() map[uint32][]byte
    Close() error
}

Two implementations satisfy it today:

Impl File Notes
BlockStore core/storage/store.go in-memory; default for runnable slice and calibration
WALStore core/storage/walstore.go WAL+extent, crash-safe; backs --persist-demo

Adding a third implementation: provide a constructor and add it to implementations() in contract_test.go. Every contract test runs against it automatically.

Execution-layer scope decision

LogicalStorage is the accepted persistence seam for this slice. The direction is correct and the contract is honored by both implementations behind it (in-memory BlockStore and crash-safe WALStore, plus the experimental smartwal.Store subpackage). The seam describes what storage IS, not what storage DECIDES.

Three other named execution institutions are deliberately deferred to later phases — not built, not implied as done:

Institution What it would own Why deferred
DataCommunicator replication + rebuild data movement currently lives informally in core/transport; promoting to a named interface needs its own scope
RecoveryExecutor command execution lifecycle (StartCatchUp / StartRebuild / session close handling) currently lives in core/adapter as VolumeReplicaAdapter; the boundary is the right shape but the interface name and method set deserve a dedicated phase
ProgressFeed a structured progress/trace surface separate from engine.TraceEntry currently every consumer reads adapter.Trace() ad hoc; a typed feed would tighten this

Recording these here so later phases can pick them up explicitly, not silently inherit "we did this already". The decision matches the architect-defined V3 execution-layer pattern in v3-phase-development-model.md §16; this slice closes the storage slot of that pattern only.

Some LogicalStorage methods are replication-facing today — ApplyEntry, AllBlocks, AdvanceFrontier, AdvanceWALTail — and exist on the seam because the current core/transport rebuild path needs them somewhere. When the future DataCommunicator seam is named, splitting those methods into a sibling interface (ReplicationSink or similar) is a clean follow-up. They satisfy contract tests against both backends today, which is enough for this slice.

Storage is not authority

LogicalStorage is execution machinery. It must not:

  • decide recovery class (catch_up vs rebuild)
  • decide mode transitions (healthy / recovering / degraded)
  • emit engine commands or interpret events
  • read engine projection as control input

Specifically: WALStore exposes Boundaries() (R, S, H), but interpreting those boundaries to choose recovery is the engine's job. The engine reads R/S/H via the adapter and classifies; storage just reports them.

Recover() recovers data, not policy. After Recover() returns, the engine still has no opinion until an AssignmentObserved event lands and the normal route runs.

On-disk layout (WALStore)

A WALStore is one preallocated file with three regions:

[0 .. 4096)                                 superblock
[4096 .. 4096+walSize)                      circular WAL region
[4096+walSize .. 4096+walSize+volumeSize)   block-indexed extent

The superblock records geometry (block size, volume size, WAL size) and a UUID. The WAL is a circular buffer; head/tail are monotonically-increasing logical counters so head==tail unambiguously means empty. The extent is preallocated to hold every addressable block at its natural offset.

WAL record format

Each record is variable-size:

prefix (30 bytes):
  LSN(8) Reserved(8) Type(1) Flags(1) LBA(8) Length(4)
data (Length bytes for Write, 0 for Trim/Barrier)
trailer (8 bytes):
  CRC32(4) EntrySize(4)

CRC covers prefix + data. The trailer's EntrySize lets a torn-write scanner detect mid-record truncation independently of the CRC. The recovery scanner walks the WAL region, validating CRC and EntrySize; the first invalid record marks the end of useful data.

Read path

A Read(lba):

  1. Looks up lba in the dirty map (sharded for low contention).
  2. If present: fetches the record from the WAL at the recorded offset and returns the data section.
  3. If absent: fetches the block from the extent at extentBase + lba * blockSize.

Write path

A Write(lba, data):

  1. Allocates the next LSN.
  2. Encodes a WAL record with that LSN.
  3. Appends to the circular WAL (the writer handles wrap-around with padding records).
  4. Updates the dirty map so subsequent reads see the new bytes.
  5. Returns the LSN — not durable yet.

Durability

Sync() enqueues an fsync request through the group committer. Concurrent Sync() callers are batched into one fsync per millisecond (default), so write throughput scales with concurrency not fsync count. When Sync() returns nil, every Write whose LSN is ≤ the returned stableLSN is on durable media.

Recovery

Recover() rebuilds the dirty map from the WAL. It:

  1. Reads the superblock for WAL geometry and head/tail hints.
  2. Scans the known head→tail range, replaying records past the checkpoint LSN into the dirty map.
  3. Continues scanning past the recorded head, in case writes landed after the last superblock update — the first invalid CRC stops the extension.

Recover() is idempotent.

How to run the demo

mkdir -p /tmp/sparrow-persist
go run ./cmd/sparrow --persist-demo --persist-dir /tmp/sparrow-persist

Expected output ends with result: PASS — all blocks survived restart.

For machine-readable evidence:

go run ./cmd/sparrow --persist-demo --persist-dir /tmp/sparrow-persist --json
{
  "path": "/tmp/sparrow-persist/sparrow-persist.dat",
  "num_blocks": 16,
  "block_size": 4096,
  "n_writes": 4,
  "synced_before_close": 4,
  "recovered_after_open": 4,
  "all_matched": true
}

Exit codes:

Code Meaning
0 All blocks round-tripped intact through Sync + Close + Recover
1 One or more blocks did not survive restart
2 Usage / flag error (e.g. missing --persist-dir)
3 Runtime error (file create / open / read / write / fsync failed)

Backing-store options (carry-forward)

The current WALStore and smartwal.Store both take a path string and treat it as a regular file: Truncate for preallocation, O_CREATE|O_EXCL for create-fresh, kernel page cache for buffering, fsync for the durability boundary.

The *os.File API preserves the option of pointing at a raw block device (/dev/sdb, /dev/nvme0n1, \\.\PhysicalDriveN on Windows) without an interface change. Going there is not in the current implementation but is not blocked by the design. Adding it is a progression of independent steps, each useful on its own.

Step Effort Net benefit (rough order)
File-or-device branch in Create/Open: skip Truncate, query device size via seek-to-end / BLKGETSIZE64 ~2 h Works on /dev/sdb; still page-cached, still fsync-bound. ~3-5x perf vs filesystem
Add O_DIRECT mode + sector-align WAL records ~6-8 h Bypass page cache; predictable latency; ~10x perf
Use FUA (Force Unit Access) on writes; drop the group committer ~4-6 h on top of O_DIRECT Per-write durability without separate fsync; concurrent writers scale linearly; ~20-50x perf
User-space NVMe (SPDK / vfio-user style) weeks/months Dedicated CPU, polling queues; ~100-500x perf; different operational model (pinned cores, hugepages)

These are perf-scale changes only — they do not alter the LogicalStorage contract. A consumer of LogicalStorage cannot tell which backing-store option was chosen, only that the contract is satisfied.

NVMe controller features worth tracking

Modern NVMe devices expose hardware features that simplify and speed up our design once we go device-direct:

Feature What it enables
FUA (Force Unit Access) bit per write Drop the group committer; per-write durability with no extra syscall
NVM Atomic Write Unit (often 16KB) Drop per-record CRC for blocks that fit; hardware guarantees torn-free writes
T10 PI (8-byte protection info per sector) End-to-end CRC the device verifies; replaces our application-level CRC for raw devices
ZNS (Zoned Namespaces) Append-only zones with GC-aware semantics; perfect substrate for the WAL region
Multiple submission/completion queues Lock-free per-writer parallelism
SR-IOV Per-volume queue isolation; no noisy-neighbor on hot writers

None of these are required for Phase 07 closure. They define the trajectory if and when V3 needs production-class storage performance.

Future work behind this seam

  • Background flusher. Currently the WAL is the active storage for any LBA that has ever been written; the extent is preallocated but unused except as the fallback for never-written LBAs. A background flusher that drains dirty entries to extent and advances the checkpoint LSN keeps WAL space bounded. The hooks (dirty map, group committer, checkpoint LSN field in the superblock) are already in place.
  • SmartWAL backend. A second LogicalStorage implementation with a denser metadata-only WAL record and extent-first writes. No interface change; old data files cannot be read by SmartWAL and vice versa.
  • Snapshots. Out of scope.
  • Replicated persistence. The transport already replicates in-memory; switching the replica side to WALStore is a small follow-up.