Commit Graph

1 Commits (dev)

Author SHA1 Message Date
Ashley b8b38bba26 Use keyset pagination when rebuilding the story index
Replace the offset-based chunk() scans in rebuildIndex() with chunkById()
keyed on the unique id column. Offset pagination over the filtered, mutating
active-stories set could skip still-live rows when a story dropped out of the
set mid-scan (an expiry flipping active=false), leaving those stories absent
from the freshly cleared Redis index. Keyset pagination resumes from the last
seen id and is immune to that shift.

Add a regression test covering the mid-scan removal and the tied-ordering
hazard.
1 week ago