Skip to content

bugfix: invalidate full parent chain in register_rollup to prevent cache accumulation#157

Open
hoijnet wants to merge 4 commits into
terminusdb:mainfrom
terminusdb-org:bugfix/fix-rollup-history-cleanup
Open

bugfix: invalidate full parent chain in register_rollup to prevent cache accumulation#157
hoijnet wants to merge 4 commits into
terminusdb:mainfrom
terminusdb-org:bugfix/fix-rollup-history-cleanup

Conversation

@hoijnet
Copy link
Copy Markdown

@hoijnet hoijnet commented Dec 22, 2025

Previously, register_rollup only invalidated the single rolled-up layer from cache. This left ancestor layers cached with Arc references, causing memory accumulation and O(n) performance degradation during high commit rates with rollups.

Now traverses the full layer stack and invalidates all ancestors, ensuring old parent chains become eligible for cleanup.

Also add cache statistics which can help understand the cache better.

… accumulation

Previously, register_rollup only invalidated the single rolled-up layer from cache.
This left ancestor layers cached with Arc references, causing memory accumulation
and O(n) performance degradation during high commit rates with rollups.

Now traverses the full layer stack and invalidates all ancestors, ensuring
old parent chains become eligible for cleanup.
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