Skip to content

fix(search): bound query result caches - #20

Merged
damienriehl merged 1 commit into
alea-institute:mainfrom
damienriehl:fix/bound-search-caches
Aug 22, 2026
Merged

damienriehl merged 1 commit into
alea-institute:mainfrom
damienriehl:fix/bound-search-caches

Conversation

@damienriehl

Copy link
Copy Markdown
Contributor

Summary

Long-running consumers no longer retain results for every unique label, definition, and prefix query. Search behavior stays unchanged, while process-lifetime query caches retain at most 128 entries each.

A folio-resolve synthetic workload exposed the impact. After one passage, _basic_search held 1,707 entries and the case-insensitive prefix cache held 766 entries; process RSS reached 1.29 GiB. The same unbounded growth helped drive a 225-item run to a 30.48 GB peak.

Validation

  • Full suite: 80 passed with 86% coverage.
  • Ruff: clean.
  • The regression drives 129 unique queries through all three cache families and verifies each stops at 128 entries.

@damienriehl
damienriehl marked this pull request as ready for review August 21, 2026 19:58
@damienriehl
damienriehl merged commit 1b4fb34 into alea-institute:main Aug 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant