-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[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
base: master
Are you sure you want to change the base?
Conversation
The PIP also solves the issue #24417 |
#### 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. |
There was a problem hiding this comment.
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?
- `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. |
There was a problem hiding this comment.
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`. |
There was a problem hiding this comment.
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`. |
There was a problem hiding this comment.
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?
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 |
There was a problem hiding this comment.
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.
Motivation & Modifications
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: x