fix: bound large repository tree memory and cleanup

This commit is contained in:
Thomas Durieux committed 2026-11-02 21:57:33 +00:00
1 parent 19b1d5b546
commit af23ad9eb5
16 files changed
+474 -71

No files matched your search

@@ -17,6 +17,7 @@ async function main() {
await File.collection.createIndex({ metadataPending: 1, repoId: 1, treeGeneration: 1 },
{ partialFilterExpression: { metadataPending: true } });
await Repository.collection.createIndex({ retiredTreeGenerations: 1 }, { sparse: true });
await Repository.collection.createIndex({ retiredPathIndexKeys: 1 }, { sparse: true });
await Repository.collection.createIndex({ "stagedFileTrees.until": 1 }, { sparse: true });
await File.collection.createIndex({ treeStaged: 1, repoId: 1, treeGeneration: 1 },
{ partialFilterExpression: { treeStaged: true } });