Skip to content

Conversation

@poorbarcode
Copy link
Contributor

@poorbarcode poorbarcode commented Apr 19, 2024

Motivation

  • Brokers will create the partitioned topic on the remote cluster automatically when calling pulsar-admin topics create-partitioned-topic under a namespace that enabled GEO-Replication.
  • Brokers will not create the partitioned topic on the remote cluster automatically when calling pulsar-admin topics set-replication-clusters.

So far, Brokers will create remote partitioned topics on namespace level GEO-Replication but do not create remote partitioned topics on topic level GEO-Replication.

This PR wants to fix the same issue that #22203 is trying to fix, since the codes of #22203 have been in conflict with branch-master and it was not active for a long time, I created the current PR.

Modifications

Topic level Geo-Replication

  • Create partitioned topics automatically when enabling topic-level replication.
    • Response to a PRECONDITION_FAILED error if the partitioned topic with different partitions on the remote cluster already exists.
    • Do not print an error log if the partitioned topic with the same partitions on the remote cluster already exists.

Namespace level Geo-Replication

  • Do not print an error log if the partitioned topic with the same partitions on the remote cluster already exists.

Next PR

When calling pulsar-admin topics create-partitioned-topic under a namespace that was enabled GEO-Replication, the broker will respond with a PRECONDITION_FAILED if the partitioned topic with different partitions on the remote cluster already exists. For now, it responds a 200 success. See the test testNamespaceLevelReplicationRemoteConflictTopicExist

Documentation

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

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode requested a review from gaoran10 April 22, 2024 13:10
@poorbarcode
Copy link
Contributor Author

Rebase master

poorbarcode added a commit that referenced this pull request May 7, 2024
…e topic level replication (#22537)

(cherry picked from commit d475655)
poorbarcode added a commit that referenced this pull request May 7, 2024
…e topic level replication (#22537)

(cherry picked from commit d475655)
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request May 13, 2024
…e topic level replication (apache#22537)

(cherry picked from commit d475655)
(cherry picked from commit 076b55e)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request May 16, 2024
…e topic level replication (apache#22537)

(cherry picked from commit d475655)
(cherry picked from commit 076b55e)
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
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.

3 participants