v2.1.8#290
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…tion to 0
The column format generation lives in the on-disk header's
orderbyte (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 aversionerror 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.