Repository navigation
Conversation
jt2594838
approved these changes
Oct 10, 2026
VGalaxies
pushed a commit
to VGalaxies/iotdb
that referenced
this pull request
Oct 26, 2026
…ay (apache#18805) * Fix subscription WAL replay gaps across seek * Fix subscription replay across transient WAL rotation visibility * Hide rotated WAL under a non-WAL filename in regression test * Fix subscription WAL gap recovery behavior * Preserve absent local index in subscription WAL replay * Remove speculative WAL gap recovery from subscription fix * Remove unproven seek boundary changes from subscription fix * test: cover replicated WAL index after fragmented local requests
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
A replicated WAL request with
searchIndex=-1could acquire a fabricated positive local index during subscription replay. The metadata fallback usesfirstSearchIndex + currentEntryIndex, but that offset also counts fragments of the same local request. The queue could then advance its cursor past real local requests even while their WAL remains available.Preserve the explicit absent local search index in the WAL body, while keeping the metadata fallback for a body too short to contain that field. Update the English and Chinese gap warning to describe an undetermined cause. Existing gap and seek behavior otherwise stays unchanged.
Regression coverage
Add a retained-WAL test with 550 fragments of local request 1877, one replicated request from another writer, and local request 1878. It verifies fragment grouping, the replicated request's absent local index and independent writer progress, and the following local request during both full replay and a seek to 1878. The old fallback returns 2427 for the replicated request, reproducing a false
[1878, 2427)gap of 549 indexes. Also update the start-filtering fixture to use explicit local indexes in the WAL body.Validation
ProgressWALIteratorTest: 16 tests, 0 failures, 0 errors; 1 opt-in benchmark skipped.expected -1, actual 2427) and passes with this PR's iterator.mvn spotless:apply -pl iotdb-core/datanodeandgit diff --checkpass.