Skip to content

fix(storage): detect stale pre-0.21 string hash indexes loudly (Fixes #1092) - #1108

Merged
adsharma merged 1 commit into
mainfrom
fix-1092-stale-hash-index-detection
Oct 5, 2026
Merged

adsharma merged 1 commit into
mainfrom
fix-1092-stale-hash-index-detection

Conversation

@adsharma

@adsharma adsharma commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

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.

…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
adsharma force-pushed the fix-1092-stale-hash-index-detection branch from 4908050 to 015064a Compare October 5, 2026 16:56
@adsharma
adsharma merged commit 3d06a53 into main Oct 5, 2026
4 checks passed
@adsharma
adsharma deleted the fix-1092-stale-hash-index-detection branch October 5, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant