-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker] replication does not work due to the mixed and repetitive sending of user messages and replication markers #24453
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
Merged
poorbarcode
merged 1 commit into
apache:master
from
poorbarcode:fix/drop_duplicated_marker_send
Jul 7, 2025
Merged
[fix][broker] replication does not work due to the mixed and repetitive sending of user messages and replication markers #24453
poorbarcode
merged 1 commit into
apache:master
from
poorbarcode:fix/drop_duplicated_marker_send
Jul 7, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ve sending of user messages and replication markers
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #24453 +/- ##
============================================
+ Coverage 73.57% 74.27% +0.70%
+ Complexity 32624 2342 -30282
============================================
Files 1877 1868 -9
Lines 139502 145511 +6009
Branches 15299 16645 +1346
============================================
+ Hits 102638 108085 +5447
+ Misses 28908 28879 -29
- Partials 7956 8547 +591
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Technoboy-
approved these changes
Jun 26, 2025
gaoran10
reviewed
Jul 7, 2025
pulsar-client/src/main/java/org/apache/pulsar/client/impl/GeoReplicationProducerImpl.java
Show resolved
Hide resolved
gaoran10
approved these changes
Jul 7, 2025
codelipenghui
pushed a commit
to codelipenghui/incubator-pulsar
that referenced
this pull request
Jul 15, 2025
…ve sending of user messages and replication markers (apache#24453)
KannarFr
pushed a commit
to CleverCloud/pulsar
that referenced
this pull request
Sep 22, 2025
…ve sending of user messages and replication markers (apache#24453)
walkinggo
pushed a commit
to walkinggo/pulsar
that referenced
this pull request
Oct 8, 2025
…ve sending of user messages and replication markers (apache#24453)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cherry-picked/branch-3.0
cherry-picked/branch-3.3
cherry-picked/branch-4.0
doc-not-needed
Your PR changes do not impact docs
ready-to-test
release/3.0.13
release/3.3.8
release/4.0.6
type/bug
The PR fixed a bug or issue reported a bug
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Background of deduplication: Always regard
markersas non-repetitiveBackground of replicated subscription: The internal producer of the replicator will send markers to replicate the subscription ack state to the remote side.
Reproduce steps of the issue
user-msg-1) to the remote clustermarker-1) to the remote clusteruser-msg-2) to the remote cluster[marker, user-msg-2]have not received the send receipt yet.2messages:[user-msg-1, marker, user-msg-1].marker-1, because it regards all markers as non-repetitive.a. Has not replied to the response to the source cluster yet.
user-msg-1, the producer gets a message ID whose value is-1:-1because it is repeated. It is faster than the messagemarker-1because it does not write BK.a. Attempts to remove the first pending send. But fails because the first pending send has not received a send receipt yet.
b. Reconnects.
c. Loop to
Step-4The send receipt of
marker-2will never be received due to infinite reconnection.Scenarios that are affected
Background: There are 2` types of Maker: TXN and Replicated Subscription
Solutions
a. It can hardly be implemented, because the broker should maintain all pending sends for all producers
b. It will break the behavior defined in the previous version.
c. It only works for a few scenarios that are used by Replication.
Modifications
Fix the issue with solution 2
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: x