Skip to content

fix(delete,retention): clear DuckDB cache and free OS memory after ex…#374

Merged
xe-nvdk merged 1 commit intomainfrom
fix/delete-retention-memory
Apr 8, 2026
Merged

fix(delete,retention): clear DuckDB cache and free OS memory after ex…#374
xe-nvdk merged 1 commit intomainfrom
fix/delete-retention-memory

Conversation

@xe-nvdk
Copy link
Copy Markdown
Member

@xe-nvdk xe-nvdk commented Apr 8, 2026

…ecution

Neither the delete handler nor the retention handler cleared DuckDB's parquet metadata/data cache after completing their file operations, causing memory to accumulate and never be released — requiring container restarts. Mirrors the cleanup pattern already used by compaction.

  • Call ClearHTTPCache() after delete/retention completes (always, including dry runs and no-match paths — read_parquet populates cache regardless)
  • Add freeOSMemoryThrottled() — debounced via atomic CAS, fires at most once every 30s in a goroutine to prevent GC storms under concurrent requests
  • Add ROW_GROUP_SIZE 122880 constant (parquetRowGroupSize) to cap write buffering during file rewrites, matching compaction's row group size
  • Fix stale "after compaction" log messages in ClearHTTPCache()

…ecution

Neither the delete handler nor the retention handler cleared DuckDB's
parquet metadata/data cache after completing their file operations,
causing memory to accumulate and never be released — requiring container
restarts. Mirrors the cleanup pattern already used by compaction.

- Call ClearHTTPCache() after delete/retention completes (always, including
  dry runs and no-match paths — read_parquet populates cache regardless)
- Add freeOSMemoryThrottled() — debounced via atomic CAS, fires at most once
  every 30s in a goroutine to prevent GC storms under concurrent requests
- Add ROW_GROUP_SIZE 122880 constant (parquetRowGroupSize) to cap write
  buffering during file rewrites, matching compaction's row group size
- Fix stale "after compaction" log messages in ClearHTTPCache()
@xe-nvdk xe-nvdk merged commit 4374ad7 into main Apr 8, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the release notes for version 2026.05.1. The changes provide more technical detail regarding the cache clearing logic, the implementation of debouncing for memory freeing to prevent GC storms, and the extraction of the row group size into a named constant. It also adds a new section documenting AWS SDK v2 dependency updates and their associated fixes. I have no feedback to provide.

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