feat(change-streamer): log top tables from in-memory queue on back pressure #5394
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
This PR brings back the in-memory queue table stats from #5350, with additional documentation explaining the critical difference between the in-memory queue and the changeLog table.
Why This Matters
In the original review of #5350, it was assumed that the changeLog table query would provide roughly the same information as the in-memory table stats. However, in production we observed:
These diverged significantly because view-syncers had slow SQLite queries, causing them to consume changes slowly. The changeLog was being drained normally, but the in-memory queue kept growing.
The Difference
Example Log Output
Changes
getTableFromChangehelper to extract table names from insert/update/delete/truncate changesgetTableFromChangehelperRelated PRs
This PR adds the in-memory stats back with better documentation explaining why both are valuable.