Skip to content
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

[fix] [broker] [Namespace-level Geo-Replication] Reject a topic creation if there is a confilct topic on the remote side #22577

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

poorbarcode
Copy link
Contributor

Motivation

The steps to describe the issue

  • There is a partitioned topic on the remote cluster, with partitions 1. And the source cluster does not have this topic.
  • Enable namespace-level Geo-Replication.
  • Create the topic with 3 partitions on the source cluster.
  • The broker just printed an error log "[Error] This topic already exists", and users get a successful response.

Modifications

Reject a topic creation if there is a conflict topic on the remote side

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 3.3.0 milestone Apr 24, 2024
@poorbarcode poorbarcode self-assigned this Apr 24, 2024
@poorbarcode poorbarcode changed the title [fix] [broker] [namespace Geo-Replication] Reject a topic creation if there is a confilct topic on the remote side [fix] [broker] [Namespace-level Geo-Replication] Reject a topic creation if there is a confilct topic on the remote side Apr 24, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 24, 2024
@poorbarcode poorbarcode reopened this Apr 24, 2024
@nodece
Copy link
Member

nodece commented Apr 25, 2024

I think we intentionally overlooked the result of creating a topic for the remote cluster.

This PR may break the user's behavior of creating topic.

According to your description, when using the default broker configuration, and the geo-replication is enabled on the namespace level, the remote cluster will create two non-partitioned topics, tenant/namespace/topic-partition-1 and tenant/namespace/topic-partition-2 by the geo producer. Is it right?

If right, I would suggest adding a topic check before starting the replicator to make sure that the topic is the same between local and remote clusters, if they are the same, start the replicator, otherwise throw a log. You can also add this check in the replicator task.

@poorbarcode
Copy link
Contributor Author

Rebase master

@poorbarcode poorbarcode requested a review from nodece April 25, 2024 08:08
…there is a confilct topic on the remote side
@poorbarcode
Copy link
Contributor Author

Rebase master

@coderzc coderzc modified the milestones: 3.3.0, 3.4.0 May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants