Repository navigation
[Subscription] Report retained WAL file gaps and retry transient reads - #18818
Merged
jt2594838 merged 2 commits intoOct 10, 2026
Merged
Conversation
jt2594838
approved these changes
Oct 10, 2026
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.
Description
Continuous subscription WAL replay could permanently skip unreadable retained files while
subscription_consensus_wal_gapremained zero. The detailed warning only ran when the iterator was exhausted, and clients received a noncritical error containing only a file count.This change makes file skips observable and diagnosable:
subscription_consensus_wal_file_gapandsubscription_consensus_wal_file_gap_entries, plus queue diagnostics. Counters accumulate across iterator resets. File counts measure skip occurrences; entry counts include only known skipped WAL entries/fragments, including discarded incomplete request fragments. An unreadable footer leaves its entry count explicitly unknown.LogbackMetricsin the dependency analyzer's test-only-scope check.subscription_consensus_wal_gapretains its local searchIndex unit. Monitoring and regression checks must require both it andsubscription_consensus_wal_file_gapto be zero; a zero known-entry count alone does not exclude a file gap. Filename searchIndex bounds describe the whole file and are not an inferred row-loss count.Validation
test: 88 tests in eight targeted subscription/WAL classes, zero failures/errors, one optional performance test skipped.test-compile -DskipTests -P with-zh-locale: passed (53 modules).test dependency:analyze-only@check-dependencies -Dtest=ProgressWALIteratorTestpassed; 20 tests passed and one optional performance test skipped. Both Logback artifacts remain present in the runtime dependency tree.This PR has:
The supplied regression logs confirm six noncritical skip errors, zero detailed iterator warnings and 5,400 zero-valued WAL-gap samples. Those logs cannot identify the skipped files or establish a row-loss count; the original high-load benchmark has not been rerun.