Repository navigation
Conversation
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
When realtime admission leaves a WAL gap before newer pending requests,
fillGapFromWALrecreates the iterator on every round. The replacement starts scanning retained files again, including entry bodies below the local replay cursor. This can make repeated reads and decompression dominate replay during ongoing writes, and discards requests cached after Tablet memory backpressure. The catch-up iterator preservation in #18808 does not cover this pending-gap path.Advance the existing iterator using the established writer-progress coverage checks. Bounded gap replay and memory retries retain their reader position and buffered request. If materialization throws after consuming a request, schedule an explicit reset at the replay cursor so that the failed request is recovered on the next round.
Validation
Three regression scenarios use real V3 WAL and check ordered delivery, ACK memory release, replay progress, and actual entry-body reads:
The first two regressions fail against master before this change. This addresses a reproducible replay defect matching the observed gap-recovery path; the original 27698 workload has not been rerun, so it does not establish the complete incident root cause.
The four related test classes pass: 78 tests succeeded and one opt-in performance benchmark was skipped.
Validation commands:
mvn spotless:apply -pl iotdb-core/datanodemvn test -pl iotdb-core/datanode -am -Dtest=ConsensusPrefetchingQueueTest,ProgressWALIteratorTest,ConsensusPrefetchingQueueWalBackpressureTest,ConsensusPrefetchingQueueDataNodeMemoryTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=falsemvn test-compile -DskipTestsmvn test-compile -P with-zh-locale -DskipTestsThis PR has: