Repository navigation
fix(storage): detect stale pre-0.21 string hash indexes loudly (Fixes #1092) - #1108
Merged
Merged
Conversation
…1092) The char-signedness portability fix (Refs #882, v0.21.0) changed string hashes for bytes >= 0x80, so PK hash slots persisted by older versions are never probed: non-ASCII FTS queries return zero rows and deletes fail with missing-term errors. On current-hash miss, probe the legacy slot; a byte-equality hit fails loudly with the rebuild remedy instead of silent wrong results. Plus a regression test pinning portable hash constants.
adsharma
force-pushed
the
fix-1092-stale-hash-index-detection
branch
from
October 5, 2026 16:56
4908050 to
015064a
Compare
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.
Validates and Fixes #1092 (FTS index built by 0.20.3 unmaintainable by 0.21.0 for non-ASCII terms).
Root cause is the storage hash layer, not tokenization: Refs #882 changed tail-byte handling, so persisted non-ASCII PK slots are never probed (5/5 non-ASCII differ old-vs-new, 4/4 ASCII identical).
Fix: on current-hash miss at the lookup choke point, probe the legacy slot; byte-equality hit throws an actionable rebuild error instead of silent wrong results. No format change, no false positives, ASCII DBs untouched. Regression test pins portable hash constants.
Minimal local testing per policy - CI owns build + e2e.