Skip to content

v2.1.8#290

Merged
singaraiona merged 2 commits into
masterfrom
dev
Jun 24, 2026
Merged

v2.1.8#290
singaraiona merged 2 commits into
masterfrom
dev

Conversation

@singaraiona

Copy link
Copy Markdown
Collaborator

…tion to 0

The column format generation lives in the on-disk header's order byte (offset 17), which is on-disk-free and was written 0 by every engine that produced today's splayed layout. A prior change stamped it 1 and demanded 1 back, which rejected every pre-existing database on load with a version error surfaced as "cannot read .d schema".

Declare the shipped generation 0 so existing on-disk data — byte-identical apart from that one header byte (symfile, SYM file-position encoding, .d schema and column data all unchanged) — loads as-is, with no migration. The check stays strict (==): generation 1 is skipped because those stray order==1 files carry the identical gen-0 layout, and the next genuine breaking layout change bumps MAJOR straight to 2 so old files are rejected for migration rather than silently mis-decoded.

  • src/store/col.h: RAY_COL_FORMAT_MAJOR 1 -> 0; rationale rewritten.
  • test/test_store.c: gen-0 (legacy/unstamped) order byte now loads; an unrecognized generation is still rejected on both load + mmap.
  • test/rfl/store/col_format_generation.rfl: regression — forced gen-0 data loads (fails if the generation is ever re-bumped); the version gate still refuses an unknown generation.
  • docs/docs/storage/index.md: document the one-byte format generation.

…tion to 0

The column format generation lives in the on-disk header's `order` byte
(offset 17), which is on-disk-free and was written 0 by every engine that
produced today's splayed layout. A prior change stamped it 1 and demanded 1
back, which rejected every pre-existing database on load with a `version`
error surfaced as "cannot read .d schema".

Declare the shipped generation 0 so existing on-disk data — byte-identical
apart from that one header byte (symfile, SYM file-position encoding, .d
schema and column data all unchanged) — loads as-is, with no migration. The
check stays strict (==): generation 1 is skipped because those stray order==1
files carry the identical gen-0 layout, and the next genuine breaking layout
change bumps MAJOR straight to 2 so old files are rejected for migration
rather than silently mis-decoded.

- src/store/col.h: RAY_COL_FORMAT_MAJOR 1 -> 0; rationale rewritten.
- test/test_store.c: gen-0 (legacy/unstamped) order byte now loads; an
  unrecognized generation is still rejected on both load + mmap.
- test/rfl/store/col_format_generation.rfl: regression — forced gen-0 data
  loads (fails if the generation is ever re-bumped); the version gate still
  refuses an unknown generation.
- docs/docs/storage/index.md: document the one-byte format generation.
@singaraiona singaraiona merged commit 23b4dac into master Jun 24, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant