Caideyipi commented on PR #19019:
URL: https://github.com/apache/iotdb/pull/19019#issuecomment-6415250967

   Follow-up self-review passed after fixing one remaining replay issue in 
[de91065d91fe302b19773629ca1b561171d77bf1](https://github.com/apache/iotdb/commit/de91065d91fe302b19773629ca1b561171d77bf1).
 No further actionable findings remain from this review of the full PR diff and 
the relevant subscription lifecycle and recovery code.
   
   **[P2] Rewind deliveries released before the last unsubscribe.** At the 
[reviewed 
revision](https://github.com/apache/iotdb/blob/3a8557836b00d7687d676476caac5618daf7d8dd/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingQueue.java#L924-L946),
 the retained replay reset only visited `inFlightEvents`. Receiver disconnects 
and consumer-instance takeovers can first move downloaded but uncommitted 
deliveries back to the prefetching queue without rewinding their responses. A 
subsequent last unsubscribe or consumer close then skipped them, so 
resubscription could receive `FILE_SEAL` or the final tablet page instead of 
replaying the data.
   
   The fix also rewinds previously delivered, uncommitted events already in the 
prefetching queue, under the queue write lock. It leaves never-delivered events 
(including batch continuations) untouched and does not increment the 
poison-message nack count. The new regressions cover released TsFile deliveries 
in tree/table mode through both unsubscribe and consumer close, verify the 
replayed file bytes and successful acknowledgement without duplicate delivery, 
and cover released tablet row replay.
   
   Validation:
   
   - **Reproduced before the fix:** the new TsFile regression failed on 
`3a8557836b0`: expected `FILE_INIT` (2), received `FILE_SEAL` (4).
   - **PASS:** 125 focused unit tests across 13 suites, with 0 failures, errors 
or skips, including all 7 retained-replay tests and the related receiver, 
broker, recycle-interval, metadata and procedure tests.
   - **PASS:** EN ConfigNode/DataNode dependency reactor through `test`, and a 
clean 29-module ZH reactor through `test-compile` with tests skipped. Required 
IoTDB modules were built from source with build-output caches disabled. EN 
reused only unchanged upstream modules from this round's clean reproduction 
build with the same source, toolchain and relevant options; DataNode and 
ConfigNode were cleaned for the final EN run. The remote runs used a 2 GB Maven 
heap and `ActiveProcessorCount=2` after local builds failed on native memory 
allocation.
   - **PASS:** `mvn spotless:apply -P with-integration-tests` scoped to the two 
changed Java files, `git diff --check`, and ConfigNodeMessages EN/ZH key parity 
and the new validation template's placeholders.
   - **NOT RUN:** feature ITs, live-node restart recovery and the full 
repository/distribution build on this follow-up. Apache still hardcodes 
subscription as disabled; the previous IT failures with status 1912 are not 
treated as passing feature validation. CI results for the newly pushed commit 
have not been evaluated.
   
   


-- 
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