[improve][broker] PIP-433: Ensure topic creation before starting GEO#24652
Conversation
9f91e51 to
a613da2
Compare
poorbarcode
left a comment
There was a problem hiding this comment.
@nodece Thanks for driving this feature
...roker/src/main/java/org/apache/pulsar/broker/service/persistent/GeoPersistentReplicator.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorTest.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorTest.java
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorTest.java
Show resolved
Hide resolved
|
Rebase master |
a47eb1f to
4c833ed
Compare
90de7bd to
36661e4
Compare
|
The tests The new code has been refactored by the AI. |
|
ping @poorbarcode |
|
@nodece I will review the PR again by this weekend |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #24652 +/- ##
=============================================
+ Coverage 38.90% 74.50% +35.60%
- Complexity 13246 33699 +20453
=============================================
Files 1842 1899 +57
Lines 145553 149746 +4193
Branches 16920 17413 +493
=============================================
+ Hits 56632 111575 +54943
+ Misses 81267 29289 -51978
- Partials 7654 8882 +1228
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
36661e4 to
f2e4b5c
Compare
62df37d to
b5953d9
Compare
PIP: #24485
Motivation
In a GEO replication scenario, if the remote cluster does not have the replicated topic and the auto-creation type differs between the local and remote clusters, message replication may fail. To ensure seamless replication, the topic metadata must be properly synchronized across clusters.
This is part of PIP-433.
#24136 is the same as this PR.
Modifications
When both the local and remote partitioned topic metadata indicate
partitions=0, this means the topic is non-partitioned. In this case, the local cluster sends a non-partitioned topic creation request to the remote cluster.If the local partitioned topic metadata has
partitions>0, this means the topic is partitioned:partitions=0, the local cluster sends a partitioned topic creation request to the remote cluster.Documentation
docdoc-requireddoc-not-neededdoc-complete