[346] Write polling diagnostics logs for sqlite_vacuum_cleaner - #378
Merged
2 commits merged intoAug 30, 2026
Conversation
added 2 commits
August 28, 2026 20:46
- Import jest from @jest/globals in failover-recovery tests that used the global (ReferenceError: jest is not defined) - Drop fake-timer usage that captured the mocked setTimeout and hung - Type logger.warn/debug spy calls to satisfy strict tsc - Export SCHEMA_MANAGER_INDEXES from db.ts and import it in the schema manager test (ReferenceError) - Make the Goldii-locks#186 migration-count assertion robust to future migrations - Accept opts argument in the indexer-runner-historical-sync getEvents mock
…ks#346) Emit high-frequency polling diagnostics for sqlite_vacuum_cleaner, mirroring indexer_runner and indexer_metrics_collector so operators can spot slow cleanup runs without enabling a profiler: - Add VacuumPollDiagnostics + logVacuumPollDiagnostics() debug logs whose messages always carry elapsedMs= (plus prunedEvents/retentionDays/ledger range context when applicable). - Time pruneOldEvents, runVacuum, pruneEventsInLedgerRange, and the whole runVacuumCleanup cycle (started/success/failure boundaries). Add tests asserting the cleanup stages and boundaries emit timing diagnostics and that failures are reported with elapsed time before propagating.
|
@ToryMic Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
9e42e6f
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.
Summary
Adds high-frequency polling diagnostics logs for
sqlite_vacuum_cleaner, mirroring the pattern already used byindexer_runnerandindexer_metrics_collector, so operators can spot slow cleanup runs without enabling a profiler.VacuumPollDiagnostics+logVacuumPollDiagnostics(), emitting debug logs whose message string always carrieselapsedMs=(plusprunedEvents,retentionDays, and ledger-range context when applicable).VACUUMcommand (run_vacuum), ledger-range pruning (prune_ledger_range), and the wholerunVacuumCleanupcycle withstarted/success/failureboundaries.Validation
sqlite-vacuum-diagnostics.test.tsasserts cleanup stage and boundary diagnostics carry numeric timing values, including failure diagnostics and the all-debug-level log practice.tsc --noEmit,npm test(961 tests), andnpm run buildall pass.Also includes small repairs to pre-existing CI failures so this branch is green.
Closes 346
Closes #346