Repository navigation
fix(tasks): headless workers leave schedules, endpoint statistics and change-log pruning to the API processes - #2281
Conversation
… change-log pruning to the API processes Headless task workers (LAKEKEEPER__SERVE_HTTP_API=false) no longer run the task schedule materializer, the endpoint statistics tracker or the cache change-log pruner. The processes that serve the HTTP API do this for the whole deployment, so a worker's small database pool serves its tasks. Every process skips the endpoint statistics flush when it counted no call. A failed statistics write logs a warning per retry and one error when it gives up.
|
No actionable comments were generated in the recent review. WalkthroughBackground-service startup now depends on HTTP API and maintenance-mode settings. Endpoint-statistics flushing skips empty batches, logs dropped batches, and retries PostgreSQL sink operations with backoff. Cache-log pruning and scheduled-job documentation now reflect HTTP API process eligibility. ChangesProcess services and endpoint statistics
Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Possibly related PRs
Suggested reviewers: Merge Risk:
|
✅ PR Title Formatted CorrectlyThe title of this PR match the correct format. Thank you! |
… change-log pruning to the API processes (#2281)
Headless task workers (
LAKEKEEPER__SERVE_HTTP_API=false) no longer queue the runs of task schedules, write endpoint statistics or prune the cache change log. The processes that serve the HTTP API already do this for the whole deployment, so a worker with a small database pool keeps its connections for its tasks, heartbeats and health checks.Due schedules are claimed in the database, so one API process is enough. Workers always run next to API processes.
Every process now skips the endpoint statistics flush when it counted no call. Idle processes ran two reads and one insert every 30 seconds.
A failed endpoint statistics write logs a warning for each retry and one error when it gives up.
Release notes
Downstream follow-up
serveis now unused, andEndpointStatisticsSink::consume_endpoint_statisticsis no longer called with an empty map.Summary by CodeRabbit
Reliability
Documentation