Store layout step 2 → 3: the audit log, journal, holds and undelete notes get subspaces of their own #368

Merged
jcoffey-dev merged 2 commits from feat/store-layout-step-3 into main 2026-11-11 06:44:15 +00:00
2 Commits
Author SHA1 Message Date
jcoffey-dev e492880fa2 Store layout step 2 -> 3: the fork's large data gets subspaces of its own
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 9m47s
The audit log, the journal's entries and archive, legal holds and
undelete's notes move out of _ into ib_audit, ib_journal, ib_holds and
ib_undelete, each key without the letter that named its feature. The
audit settings and the journals themselves stay in _, where a
configuration export carries them. Exports carry the moved data in a
compliance family of its own, on by default (SL-19).

The step lists the two-byte prefixes in _ and stops before writing
anything on a key no feature claims (SL-16). It copies each moving
prefix, on SQL with one INSERT ... SELECT, checks counts and the audit
and journal chain heads and floors, and only then deletes the originals
and drops RocksDB's legacy v and c (SL-17, SL-20). It isn't
rolling-safe, so it waits for every other node to stop (SL-18).

INBUXA_STORE_VERSION is 3.
2026-11-10 22:47:02 -07:00
jcoffey-dev d71058478f Name subspaces through one function, so later ones can have names (SL-15)
Every backend built its table or column family name from the subspace
byte, with char::from or an unchecked UTF-8 cast. Every lowercase letter
is taken, so step 2 -> 3 needs subspaces from 0x80 up, which have no
one-byte name and would have made the RocksDB cast undefined.

store::subspace_name now gives each subspace its name. Below 0x80 it is
the byte, as before, so no table or column family changes. From 0x80 up
there are none yet; step 2 -> 3 adds them as ib_ names.
2026-11-10 21:57:08 -07:00