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

   Self-review passed at `6bcc95a6d2d4176a186ee986ae3e692e020778c6`. I reviewed 
the complete diff, the related subscription provider/consumer and server 
receiver/broker paths, and the regression tests. All confirmed actionable 
issues have been fixed and pushed:
   
   - **Recovery could delete the shared consumer and subscriptions.** A 
broker-missing 1904 leaves the transport usable, so disposing that provider 
with subscription CLOSE unsubscribed all topics and dropped the consumer. 
Partial recovery and the all-unavailable fallback now close only stale 
sessions, force-closing their transports. See 
[AbstractSubscriptionProviders.java:256](https://github.com/apache/iotdb/blob/6bcc95a6d2d4176a186ee986ae3e692e020778c6/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProviders.java#L256)
 and 
[AbstractSubscriptionProvider.java:426](https://github.com/apache/iotdb/blob/6bcc95a6d2d4176a186ee986ae3e692e020778c6/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProvider.java#L426).
   - **A late successful heartbeat could revive a failed provider and suppress 
replacement.** Provider failure is now terminal for that connection, and stale 
heartbeat results cannot overwrite the consumer's topic snapshot. See 
[AbstractSubscriptionProvider.java:258](https://github.com/apache/iotdb/blob/6bcc95a6d2d4176a186ee986ae3e692e020778c6/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProvider.java#L258)
 and 
[AbstractSubscriptionProviders.java:360](https://github.com/apache/iotdb/blob/6bcc95a6d2d4176a186ee986ae3e692e020778c6/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProviders.java#L360).
   - **A retired connection's late fenced heartbeat could fence the recovered 
consumer.** Fencing now checks that the responding provider is still the 
current provider. See 
[AbstractSubscriptionProviders.java:379](https://github.com/apache/iotdb/blob/6bcc95a6d2d4176a186ee986ae3e692e020778c6/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProviders.java#L379).
   - **Recovery continued opening connections after concurrent consumer 
close.** Both partial recovery and all-unavailable reopening now stop when 
closing is observed; an already-started replacement is closed rather than 
retained. See 
[AbstractSubscriptionProviders.java:98](https://github.com/apache/iotdb/blob/6bcc95a6d2d4176a186ee986ae3e692e020778c6/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProviders.java#L98)
 and 
[AbstractSubscriptionProviders.java:528](https://github.com/apache/iotdb/blob/6bcc95a6d2d4176a186ee986ae3e692e020778c6/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProviders.java#L528).
   - **File/tablet broker-missing 1904 diagnostics did not trigger recovery.** 
The classifier now handles their distinct server messages in both server 
locales. Other 1904 errors, including a null message, remain non-critical. See 
[AbstractSubscriptionProvider.java:772](https://github.com/apache/iotdb/blob/6bcc95a6d2d4176a186ee986ae3e692e020778c6/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProvider.java#L772).
   
   Validation on Linux with JDK 17 and Maven 3.9.12:
   
   - Eight added regression tests reproduced failures against original head 
`903afb4c7238fb1d6ce9ac2928b1944e9babdb2e`.
   - `mvn spotless:apply -P with-integration-tests -pl 
iotdb-client/subscription`: passed.
   - Clean `-pl iotdb-client/subscription -am` reactor with all 19 subscription 
test classes selected in Surefire: **108 tests passed, 0 failures, 0 errors, 0 
skipped**. This includes partial/all-provider recovery, late heartbeat 
success/fencing, close during replacement, continuation failures, and commit 
failure without automatic replay.
   - Clean `test-compile -P with-integration-tests,with-zh-locale -pl 
iotdb-client/subscription -am -DskipTests`: passed.
   - All required IoTDB modules were rebuilt from source with build caches 
disabled. TsFile was also rebuilt from source commit 
`8d487b753c441aa14c61dffed7d7709001f3039c`; final logs show no build-cache hits.
   
   Cluster/restart integration tests and a full distribution build were not run.


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