-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][broker] Reduce unnecessary REPLICATED_SUBSCRIPTION_SNAPSHOT_REQUEST #23839
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23839 +/- ##
============================================
+ Coverage 73.57% 74.12% +0.55%
+ Complexity 32624 32187 -437
============================================
Files 1877 1853 -24
Lines 139502 143581 +4079
Branches 15299 16312 +1013
============================================
+ Hits 102638 106430 +3792
+ Misses 28908 28754 -154
- Partials 7956 8397 +441
Flags with carried forward coverage won't be shown. Click here to find out more.
|
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatedSubscriptionTest.java
Outdated
Show resolved
Hide resolved
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.
LGTM
…_REQUEST (apache#23839) (cherry picked from commit d3707c5) (cherry picked from commit 7c7fadd)
…_REQUEST (apache#23839) (cherry picked from commit d3707c5) (cherry picked from commit 7c7fadd)
Motivation
Let's say two clusters to two-way replication: cluster-1 and cluster-2
cluster-2
cluster-1
or disabled subscription replication.As a result,
cluster-1
will send SNAPSHOT_REQUEST tocluster-2
at a frequency ofreplicatedSubscriptionsSnapshotFrequencyMillis
(1 second by default).In extreme cases, this can lead to a large number of consecutive
marker
betweencluster-1
andcluster-2
topic.This may affect the performance of
reader
andconsumer
, or causereader.readNext()
to time out.Modifications
Verifying this change
testReplicatedSubscriptionOneWay
to cover this case.Documentation
doc
doc-required
doc-not-needed
doc-complete