Skip to content

Subscription: Rename topic modes to initial and incremental - #18370

Open
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:rename-subscription-modes
Open

Subscription: Rename topic modes to initial and incremental#18370
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:rename-subscription-modes

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Rename canonical topic modes

  • Add initial for full snapshot plus incremental data and make it the default mode.
  • Add incremental for incremental-only subscriptions.
  • Update ConfigNode, DataNode, examples, messages, and integration-test configurations to use the new names.

Preserve backward compatibility

  • Continue accepting live as an alias of initial.
  • Continue accepting consensus as an alias of incremental.
  • Keep the old constants and mode predicates as deprecated APIs.
  • Normalize aliases to canonical values so altering an existing legacy topic to the new name is not treated as a mode change.
  • Keep mapping initial to the Pipe source's internal live mode.

Validation

  • mvn test -pl iotdb-client/subscription -Dtest=TopicConfigTest
  • mvn test -pl iotdb-client/subscription -P with-zh-locale -Dtest=TopicConfigTest
  • SubscriptionInfoTopicValidationTest: 25 tests passed through targeted JUnit execution.
  • mvn compile -pl example/subscription -Ddevelocity.off=true
  • Spotless applied to the modified subscription, ConfigNode/DataNode, and integration-test sources.
  • English/Chinese message constant parity verified.
  • git diff --check

The standard ConfigNode Maven test command is currently blocked during compilation by the pre-existing PipeConfigNodeTaskAgent.getProgressIndexByType(...) error, before the targeted test executes.


This PR has:

  • been self-reviewed.
  • added comments explaining compatibility behavior where it is not obvious.
  • added or updated unit tests for the new and legacy mode values.
  • updated existing integration-test configurations to use the canonical names.

Key changed/added classes (or packages if there are too many classes) in this PR
  • TopicConstant
  • TopicConfig
  • SubscriptionInfo
  • ConfigNode/DataNode subscription runtime handling
  • Subscription examples and integration tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant