-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker] Resolve the issue of frequent updates in message expiration deletion rate #24190
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] Resolve the issue of frequent updates in message expiration deletion rate #24190
Conversation
…iration deletion rate
|
@zjxxzjwang Please add the following content to your PR description and select a checkbox: |
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
Show resolved
Hide resolved
nodece
left a comment
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
|
This is similar to PR #19759, but not sure how it was reverted |
|
Get the reverting information: #24073 |
|
@zjxxzjwang Would you please help add a unit test for this change following PR #19759. Seems this part of code is easy to be broken, it is better to protect it. |
Good suggestion, I have also considered it before. But it seems that there are no good test examples to determine if this has not been broken. |
|
@lhotari Hello, can you review it |
|
@zjxxzjwang Please rebase the master branch, and then I will merge this PR after CI passes. |
|
/pulsarbot rerun-failure-checks |
…iration deletion rate
…iration deletion rate
…xpiration-rate' into master-Optimization-of-message-expiration-rate
hello , I have rebased the master branch and added test cases. Can you help me merge it |
…iration deletion rate
hanmz
left a comment
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
…tion deletion rate (apache#24190) Co-authored-by: zjxxzjwang <zjxxzjwang@tencent.com> (cherry picked from commit 81c94c8) (cherry picked from commit ef5c829)
…tion deletion rate (apache#24190) Co-authored-by: zjxxzjwang <zjxxzjwang@tencent.com> (cherry picked from commit 81c94c8) (cherry picked from commit 071dacf)
…tion deletion rate (apache#24190) Co-authored-by: zjxxzjwang <zjxxzjwang@tencent.com> (cherry picked from commit 81c94c8) (cherry picked from commit ef5c829)
…tion deletion rate (apache#24190) Co-authored-by: zjxxzjwang <zjxxzjwang@tencent.com> (cherry picked from commit 81c94c8) (cherry picked from commit ef5c829)
…tion deletion rate (apache#24190) Co-authored-by: zjxxzjwang <zjxxzjwang@tencent.com> (cherry picked from commit 81c94c8) (cherry picked from commit 071dacf)
…tion deletion rate (apache#24190) Co-authored-by: zjxxzjwang <zjxxzjwang@tencent.com> (cherry picked from commit 81c94c8) (cherry picked from commit ef5c829)
…tion deletion rate (apache#24190) Co-authored-by: zjxxzjwang <zjxxzjwang@tencent.com> (cherry picked from commit 81c94c8) (cherry picked from commit ef5c829)
…tion deletion rate (apache#24190) Co-authored-by: zjxxzjwang <zjxxzjwang@tencent.com> (cherry picked from commit 81c94c8)
…tion deletion rate (apache#24190) Co-authored-by: zjxxzjwang <zjxxzjwang@tencent.com>
…tion deletion rate (apache#24190) Co-authored-by: zjxxzjwang <zjxxzjwang@tencent.com>
Motivation
Modifications
At present, the message expiration deletion rate is updated in the getmessageExpiryRate() method, and this rate is updated every time the topic status is obtained. This results in the statistical analysis of message expiration and deletion rates not having a fixed periodicity, making it difficult to represent the true message expiration rate.
Documentation
Only update the rate in the updateRate() method and only retrieve the value in the getmessageExpiryRate() method
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: