Conversation
…on flush failure Two changes to prevent disk-pressure-driven OOM cycles: 1. Skip storing args/kwargs/traceback for successful invocations of tasks exceeding DETAIL_RATE_THRESHOLD (default 500/min). The core invocation row (timestamps, runtime, worker, state) is always written — only the heavy detail fields are omitted. Failures and retries always keep full detail. Reduces detail table growth proportional to the highest-rate tasks without losing aggregate accuracy or invocation visibility. 2. On SQLite flush failure, remove the drained records from self.invocations instead of retaining them. Previously, disk-full errors caused records to leak in memory permanently (popped from _sqlite_pending but never removed from invocations), driving RSS growth at ~1.5 GB/hr until OOM.
Contributor
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detail cap for high-rate tasks — for tasks above 500/min (
DETAIL_RATE_THRESHOLD), args/kwargs/traceback are not stored for successes. Failures and retries always keep full detail regardless of rate. Aggregates unaffected.Flush failure safety — on SQLite flush error (e.g. disk full), drained records are now removed from
self.invocationsinstead of being retained permanently. Previously this caused ~1.5 GB/hr RSS growth until OOM because records were popped from the pending queue but never cleaned up.Context — the 17 GB SQLite file on 20 GB PVC caused hourly purge WAL spikes to briefly hit 100% disk, failing subsequent flushes and triggering the RSS leak. The detail cap reduces write volume for the heaviest tasks, and the flush safety prevents memory blowup when writes do fail.