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

   ## Description
   
   When realtime admission leaves a WAL gap before newer pending requests, 
`fillGapFromWAL` recreates 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:
   
   - Repeated gaps across bounded rounds: six delivered requests read 7 bodies 
instead of 15.
   - Repeated gaps with memory backpressure: six delivered requests read 8 
bodies instead of 33.
   - A one-time conversion failure: the failed request is retried and delivered 
in order.
   
   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/datanode`
   - `mvn test -pl iotdb-core/datanode -am 
-Dtest=ConsensusPrefetchingQueueTest,ProgressWALIteratorTest,ConsensusPrefetchingQueueWalBackpressureTest,ConsensusPrefetchingQueueDataNodeMemoryTest
 -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false`
   - `mvn test-compile -DskipTests`
   - `mvn test-compile -P with-zh-locale -DskipTests`
   
   This PR has:
   
   - [x] been self-reviewed for concurrent prefetch, ACK, seek, and close 
behavior.
   - [x] added comments explaining reader preservation and exceptional retry.
   - [x] added unit tests covering the changed replay path.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to