[fix] [broker] Prevent long deduplication cursor backlog so that topic loading wouldn't timeout#22479
Conversation
…c loading timeout
|
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 |
…c loading wouldn't timeout (apache#22479)
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
MessageDeduplicationmaintains 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
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: x