Skip to content

[improve][pip] PIP-433: Optimize the conflicts of the replication and automatic creation mechanisms, including the automatic creation of topics and schemas #24485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

poorbarcode
Copy link
Contributor

@poorbarcode poorbarcode commented Jul 3, 2025

Motivation & Modifications

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode added this to the 4.1.0 milestone Jul 3, 2025
@poorbarcode poorbarcode self-assigned this Jul 3, 2025
@github-actions github-actions bot added PIP doc-required Your PR changes impact docs and you will update later. labels Jul 3, 2025
@poorbarcode
Copy link
Contributor Author

The PIP also solves the issue #24417

Comment on lines +14 to +24
#### Topic auto-creation by clients if you have enabled Geo Replication.
- `Client of source cluster`: start a consumer/producer for a topic
- `Client of source cluster`: Get partitions for topic
- At this step, the client will try to get the partitioned metadata of the topic. If the topic does not exist, the broker will create the partitioned metadata automatically.
- `Client of source cluster`: Start internal consumers/producers for each sub-topic
- At this step, the client will try to connect to the sub-topic. If the sub-topic does not exist, the broker will create the partitioned metadata automatically.
- `Source broker`: starts the geo replicator when a sub-topic is loading up.
- The geo replicator maintains an internal producer for the topic under the remote cluster.
- The internal producer is a single sub-topic producer; it will not trigger a partitioned metadata auto-creation.
- When starting the internal producer, it confirms that the target topic under the remote cluster should be a non-partitioned topic or a sub-topic.
- **(Highlight)** Otherwise, prints error logs and stops to start.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the topic creation is triggered by the clients, the default partitions of topic auto-creation will be used in this case?

Comment on lines +18 to +19
- `Client of source cluster`: Start internal consumers/producers for each sub-topic
- At this step, the client will try to connect to the sub-topic. If the sub-topic does not exist, the broker will create the partitioned metadata automatically.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does sub topic means here? internal partition of a partitioned topic?

-e, --enable Enable schema validation enforced
```

To add a new param `--always-allow-for-replicator-if-compatible`, which means that always allow the replicator to register a new schema if compatible. The default value is `true`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this option in broker.conf?

Default: non-partitioned
```

To add a new param `--always-allow-for-replicator`, which means that always allow the replicator to trigger a topic auto-creation, including partitioned topics. The default value is `true`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this option in broker.conf?

Comment on lines +58 to +61
3. Checks compatibility between two clusters when enabling namespace-level replication, which includes the following
a. All topics’ partitions that have been created should be the same, including `__change_events`
b. Auto-creation policies should be the same
c. Support for adjusting policies automatically when enabling namespace-level policies, and provide an API to review the changes that will be applied. By the way, this feature will be an option param of enabling namespace-level geo replication
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the geo-replication should get rid of the topic auto-creation. So we don't need to sync the policies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required Your PR changes impact docs and you will update later. PIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants