You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "Caideyipi (via GitHub)" <gi...@apache.org> on 2026/10/13 07:21:09 UTC

[PR] [Bugfix] Bound consensus subscription WAL scans per prefetch round [iotdb]

Caideyipi opened a new pull request, #18849:
URL: https://github.com/apache/iotdb/pull/18849

   When consensus subscription replay scans a wide WAL prefix or a fragmented request, a single `ProgressWALIterator.hasNext()` can read many physical entries before returning a logical request. The queue's logical-request limit does not bound this work, so one region can occupy a shared prefetch worker for minutes while other regions stop delivering data.
   
   Share a physical-entry scan budget and a cooperative 50 ms time slice across WAL catch-up, pending-gap recovery, readability probes, and end-of-round scheduling. A yielded scan preserves its reader position, pending fragments, and buffered retry request, publishes completed tablets, and requeues the task so other regions can run. Repeated realtime jumps continue a yielded gap scan instead of reopening it at the old cursor. A yield is distinct from WAL exhaustion and does not trigger a WAL roll or an incomplete-scan error. The public unbounded iterator API retains its existing behavior.
   
   Regression coverage checks skipped prefixes and replicated request fragments across several rounds, deadline expiry and buffered retries, and repeated pending gaps with exactly one delivery per request. Existing memory backpressure, seek, WAL corruption/retry, and queue tests also pass.
   
   Validation:
   
   - `mvn -nsu -Ddevelocity.off=true -pl iotdb-core/datanode spotless:apply`
   - `mvn -nsu -Ddevelocity.off=true -pl iotdb-core/datanode -am test-compile -DskipTests`
   - `mvn -nsu -Ddevelocity.off=true -pl iotdb-core/datanode -am test -Dtest=ProgressWALIteratorTest,ConsensusPrefetchingQueueTest,ConsensusPrefetchingQueueWalBackpressureTest,ConsensusPrefetchingQueueSeekTest -Dsurefire.failIfNoSpecifiedTests=false` — 76 tests, 0 failures/errors, 1 optional benchmark skipped.
   - `mvn -nsu -Ddevelocity.off=true -pl iotdb-core/datanode -am test-compile -P with-zh-locale -DskipTests`
   - `git diff --check`
   
   The time slice is checked between WAL operations and cannot interrupt an individual file read. The original hour-long, wide-table workload has not been rerun, so its throughput and stall-duration improvement still need workload validation.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Bugfix] Bound consensus subscription WAL scans per prefetch round [iotdb]

Posted by "jt2594838 (via GitHub)" <gi...@apache.org>.
jt2594838 merged PR #18849:
URL: https://github.com/apache/iotdb/pull/18849


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org