-
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
[fix] [broker] Prevent long deduplication cursor backlog so that topic loading wouldn't timeout #22479
[fix] [broker] Prevent long deduplication cursor backlog so that topic loading wouldn't timeout #22479
Conversation
…c loading timeout
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
The title "Deduplication cursor has infinite backlog causing topic load timeout" is misleading since the backlog isn't infinite. |
Done |
👍 |
…c loading wouldn't timeout (apache#22479) (cherry picked from commit 837f8bc) (cherry picked from commit 0fbcbb2)
Do not worry, it only affects the scheduled task. |
…c loading wouldn't timeout (apache#22479) (cherry picked from commit 837f8bc) (cherry picked from commit 0fbcbb2)
…c loading wouldn't timeout (apache#22479) (cherry picked from commit 837f8bc) (cherry picked from commit 0fbcbb2)
…c loading wouldn't timeout (apache#22479) (cherry picked from commit 837f8bc) (cherry picked from commit 0fbcbb2)
…c loading wouldn't timeout (apache#22479) (cherry picked from commit 837f8bc) (cherry picked from commit 0fbcbb2)
…c loading wouldn't timeout (apache#22479) (cherry picked from commit 837f8bc)
@poorbarcode DeduplicationDisabledBrokerLevelTest.testSnapshotCounterAfterUnload fails in branch-3.2 and blocks 3.2.3 release. do you have a chance to fix the problem in branch-3.2 ? |
@lhotari found the issue. PR 22034 exists in branch-3.2 so the test is wrong. resolved with commit c2532b9 |
Motivation
Background 1
Issue 1
(Highlight) the scheduled task that acknowledges messages for the deduplication cursor can only be created when the broker level deduplication is enabled, leading to an infinite backlog of deduplication cursor; the next deduplication recovery after a topic unloading will take a long time, which leads to topic load timeout.
Background 2
MessageDeduplication
maintains a counter that indicates how many messages have not been taken snapshot yet, it increases after per add entry. Broker triggers a snapshot building once the counter is greater than the configbrokerDeduplicationEntriesInterval
(default value is1000
).Issue 2, thanks for @mattisonchao 's reminding ❤️
999
, does not reachbrokerDeduplicationEntriesInterval(1000)
now.0
,999
, does not reachbrokerDeduplicationEntriesInterval(1000)
now.A topic internal stats
topic-internal-stats.txt
Modifications
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: x