hybriel
mpackdb: an added index stays stale after older code writes to the same store
opened by Anton
opened · updated
Report 2026-11-04 (tracker conductor via Apollo; blocks tracker#62). Index coverage is tracked per table (idxstate.json coveredBytes), not per index (engine.zig initIndexes). New code with added indexes (urlSegment, tmdbId) builds them; older-schema code then opens the same store, inserts a record, rewrites meta.json with the old schema and advances coveredBytes (53 -> 109) without touching the added index files. New code reopens and accepts the stale index files: the new record is found by primary key, but slug/TMDB queries return 0, with no error. Adding an index is therefore unsafe across a rollback and likely across a standby handover. Repro: tracker branch hm62-personindex 66f83de, tools/hm62-migration-repro.hl (HM62_DB, HM62_PHASE seed/build/oldwrite/verify); evidence claude-scratch/tracker/HM62; runtime bin 6b481aa7, libmpackdb f12e112f.
Blocks
review tracker.worldapi.org #62Person lookups without 2.4 M heap objects
History
Anton opened the ticket 1 comment
Anton changed the state done
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
Write…