chroma-core / chroma

the AI-native open-source embedding database
https://www.trychroma.com/
Apache License 2.0
14.72k stars 1.23k forks source link

[ENH]: purge block cache after compaction #2741

Closed codetheweb closed 1 month ago

codetheweb commented 1 month ago

Description of changes

After a successful compaction, the blocks in the cache are obsolete. This purges the cache of old blocks which helps to clarify memory usage patterns (memory usage should no longer grow over time).

Test plan

How are these changes tested?

Tested by profiling memory usage and confirming that usage did not grow after subsequent compactions.

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?

n/a

github-actions[bot] commented 1 month ago

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation