Caideyipi opened a new pull request, #19019: URL: https://github.com/apache/iotdb/pull/19019
## Description Allow initial-mode subscription topics (historical and real-time data) to use `retain.progress.after.unsubscribe`. When it is enabled, a consumer group can unsubscribe and later resume through its original subscription Pipe and queue. Uncommitted deliveries are requeued when the group detaches, while committed progress remains attached to the retained runtime. ### Behavior and recovery - Accept and validate boolean retention values for initial and incremental topics. Keep snapshot rejection and the incremental-only restrictions on `retention.bytes` and `retention.ms`. - Persist explicit retained-initial-topic markers in consumer-group metadata. Keep the running Pipe, broker and queue alive after the last unsubscribe or consumer close, and reuse the existing Pipe on resubscription. - Remove retained runtimes when a topic is deleted or retention is disabled. Persist cleanup state for procedure recovery and restore metadata, Pipe progress and retained markers during rollback, with model-scoped lookups. - Add regression coverage for validation, Pipe reuse, consumer close, queue preservation, metadata/procedure serialization, cleanup rollback and tree/table isolation. Add IT cases for committed progress, uncommitted deliveries, writes during unsubscription and the default non-retaining behavior. ## Verification - Passed `mvn spotless:apply -P with-integration-tests` and `git diff --check`. - Passed 79 unit tests across `SubscriptionInfoTopicValidationTest`, `DropConsumerProcedureTest`, `CreateSubscriptionProcedureTest`, `DropSubscriptionProcedureTest`, `AlterTopicProcedureTest`, `DropTopicProcedureTest`, `SubscriptionConsumerAgentTest` and `ConsumerGroupDeSerTest` (0 failures, errors or skips). - Passed English and Chinese `test-compile -DskipTests` for node-commons, DataNode, ConfigNode and their upstream reactor modules. Checked en/zh constant-key parity, the new template's placeholders and added user-visible string literals. - Full-reactor English `test-compile -DskipTests` reached distribution but failed to resolve the server, CLI and ConfigNode `2.0.11-SNAPSHOT` zip artifacts. The fresh Chinese full-reactor attempt encountered an incompatible system Maven; after replacing it, Maven Central extension dependency resolution stalled and the run was stopped. Neither full-reactor check is claimed as successful. - The two new IT methods compiled and ran locally, but both failed with `1912: Subscription is not enabled.` The Apache source currently hardcodes `CommonConfig.SUBSCRIPTION_ENABLED = false`. End-to-end resume and live cluster restart behavior therefore remain unverified; serialization and rollback are covered by the focused tests. This PR has: - [x] been self-reviewed. - [x] added or updated unit tests. - [x] added integration tests. - [x] added comments explaining lifecycle and serialization decisions. -- 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]
