Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18844 +/- ##
============================================
- Coverage 45.91% 45.88% -0.04%
Complexity 712 712
============================================
Files 5502 5502
Lines 398778 399039 +261
Branches 51968 52043 +75
============================================
- Hits 183094 183082 -12
- Misses 215684 215957 +273 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jt2594838
approved these changes
Oct 14, 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
Consensus subscriptions can release a newer writer's records before an older replicated record that lies beyond the current read batch. With the default 1024-record scan limit, 1024 records from writer 7 at physical time 2000 followed by writer 8 at physical time 1000 can produce
7@2000 -> 8@1000, even though both applied safe frontiers have reached 3000. A writer blocked by a safe frontier can also keep immediately rescheduling without delivering data.Pair each applied safe physical time with its covered writer sequence, and use that frontier only after the subscription reader consumes the sequence. Merge raw writer heads by
(physicalTime, nodeId, localSeq)before converting Tablets, so the example delivers8@1000 -> 7@2000. Persistent WAL readers retain one reserved raw head per writer and share a per-round scan budget. This also allows ordering to progress with memory for only one Tablet, releases pending/WAL duplicates, and closes the additional readers on seek or deactivation. Confirmed corrupt WAL skips are shared between readers and reported once.When an idle writer's frontier blocks delivery, retry after 100 ms instead of spinning. Actual unfinished scans can still immediately reschedule, and the existing batch linger deadline remains effective. Independent writer readers require additional WAL scan passes for multiple writers; retained heads and per-round scans stay bounded.
Validation
origin/masterqueue.mvn test -pl iotdb-core/consensus,iotdb-core/datanode -Dtest=WriterSafeFrontierTrackerTest,ConsensusPrefetchingQueueWriterOrderingTest,ConsensusPrefetchingQueueDataNodeMemoryTest,ConsensusPrefetchingQueueSeekTest,ConsensusPrefetchingQueueWalBackpressureTest,ConsensusPrefetchingQueueTest,ProgressWALIteratorTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false: passed, 92 tests in total, 91 passed and one existing opt-in performance benchmark skipped.mvn test-compile -DskipTests -Dmaven.build.cache.enabled=false -Ddevelocity.off=true: full English reactor passed.mvn test-compile -DskipTests -P with-zh-locale -Dmaven.build.cache.enabled=false -Ddevelocity.off=true: full Chinese reactor passed.git diff --check: passed.For local build setup, installed the server, CLI, and ConfigNode ZIP artifacts needed by distribution. That prerequisite packaging run used
-Drat.skip=truebecause RAT rejects five existing generated Go files in the client submodule. Both reactor compiles and targeted tests passed without that skip flag.This PR has:
Key changed classes:
ConsensusPrefetchingQueue,ProgressWALIterator, andWriterSafeFrontierTracker.