Skip to content

Fix datastore cache failure modes - #675

Open
satyakigh wants to merge 3 commits into
mainfrom
fix/filedb-targeted-failures
Open

Fix datastore cache failure modes#675
satyakigh wants to merge 3 commits into
mainfrom
fix/filedb-targeted-failures

Conversation

@satyakigh

@satyakigh satyakigh commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Added application-specific keys for FileDB v4 and LMDB v7. The new keys do not use hostname, CPU, storage path, or other mutable identifiers, preventing environment changes from making cached data undecryptable.
  • Added targeted FileDB cache reloads. On an in-memory cache miss, FileDB checks the deterministic file directly, allowing a process to see cache entries written by another process without scanning the entire directory.
  • Removed directory scanning from FileDB.stats(). This prevents the one-minute telemetry cycle from repeatedly scanning the cache directory and producing ENFILE errors when the host file table is exhausted.

@satyakigh
satyakigh requested a review from a team as a code owner September 2, 2026 04:08
@github-code-quality

github-code-quality Bot commented Sep 2, 2026

Copy link
Copy Markdown

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/vitest

The overall line coverage in commit 130cc7d in the fix/filedb-targeted-... branch remains at 90%, unchanged from commit a1a3d82 in the main branch.

Show a line coverage summary of the most impacted files.
File main a1a3d82 fix/filedb-targeted-... 130cc7d +/-
src/datastore/f...yedFileStore.ts 98% 97% -1%
src/datastore/f...e/Encryption.ts 100% 100% 0%
src/utils/MachineKey.ts 86% 89% +3%
src/datastore/lmdb/Utils.ts 67% 100% +33%

Updated September 02, 2026 21:20 UTC

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