Caideyipi commented on PR #19023: URL: https://github.com/apache/iotdb/pull/19023#issuecomment-6433205775
Re-review completed after checking the full PR diff and the related commit batching, server ACK handling, provider recovery, asynchronous commit, and consumer lifecycle paths. Fixed one additional issue in [53b3b02ad4b](https://github.com/apache/iotdb/commit/53b3b02ad4b1d394b4836f32a6ec817ee4b0e39b). **[P2] Retry completion could roll back a newer committed checkpoint** — [`AbstractSubscriptionConsumer.java:1589`](https://github.com/apache/iotdb/blob/72494ee3e4063d71c3680a7b80798b533ae518b0/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumer.java#L1589). After an earlier RPC batch succeeded and a later batch lost its connection, the earlier batch's progress was immediately applied. A concurrent ACK could then advance the same region, but the successful retry merged the old snapshot into its result and applied it again, moving the recoverable checkpoint backward. Completed-batch progress is now applied once, and retry completion returns only the final attempt's progress. Accepted-context accounting and retrying only unconfirmed batches are preserved. Added [`testAsyncCommitRetryDoesNotOverwriteNewerCommittedProgress`](https://github.com/apache/iotdb/blob/53b3b02ad4b1d394b4836f32a6ec817ee4b0e39b/iotdb-client/subscription/src/test/java/org/apache/iotdb/session/subscription/consumer/base/SubscriptionConsumerMultiProviderPollTest.java#L599), which coordinates an asynchronous retry with a newer synchronous ACK to the same region. Validation: - The final regression test failed against the pre-fix implementation: expected `localSeq=2`, but retry completion restored `localSeq=1`. It passes with the fix. - On a remote JDK 17 host, the clean 11-module dependency reactor passed with two Maven threads, an isolated Maven repository, sanitized global/user settings, and build caches disabled. All **51 tests passed**, with no failures, errors, or skips. Checkstyle and Spotless passed. The tested source blobs match the pushed commit. - Local `mvn spotless:apply -P with-integration-tests -pl iotdb-client/subscription` and `git diff --check` passed. Unit tests ran remotely; local unit tests and the original long-running workload were not run. Focused test command, with the isolated repository, sanitized settings, and cache disabling also supplied: ```sh mvn -T 2 clean test -pl iotdb-client/subscription -am -P with-integration-tests \ -Dtest=SubscriptionConsumerMultiProviderPollTest,SubscriptionConsumerLifecycleTest,SubscriptionProviderConnectionTimeoutTest,SubscriptionProviderSlicingTest \ -Dsurefire.failIfNoSpecifiedTests=false ``` -- 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]
