[fix][broker]unify time unit at dropping the backlog on a topic#17957
Merged
codelipenghui merged 2 commits intoapache:masterfrom Oct 10, 2022
Merged
[fix][broker]unify time unit at dropping the backlog on a topic#17957codelipenghui merged 2 commits intoapache:masterfrom
codelipenghui merged 2 commits intoapache:masterfrom
Conversation
Contributor
Author
AnonHxy
reviewed
Oct 7, 2022
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BacklogQuotaManagerTest.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BacklogQuotaManagerTest.java
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BacklogQuotaManagerTest.java
Outdated
Show resolved
Hide resolved
Contributor
Author
|
@AnonHxy PTAL |
AnonHxy
approved these changes
Oct 8, 2022
Contributor
Author
|
/pulsarbot ready-to-test |
Jason918
approved these changes
Oct 8, 2022
Contributor
Author
|
/pulsarbot run-failure-checks |
Contributor
Author
|
/pulsarbot ready-to-test |
Contributor
Author
|
/pulsarbot run-failure-checks |
2 similar comments
Contributor
Author
|
/pulsarbot run-failure-checks |
Contributor
Author
|
/pulsarbot run-failure-checks |
codelipenghui
approved these changes
Oct 10, 2022
| // Timestamp only > 0 if ledger has been closed | ||
| if (ledgerInfo.getTimestamp() > 0 | ||
| && currentMillis - ledgerInfo.getTimestamp() > quota.getLimitTime()) { | ||
| && currentMillis - ledgerInfo.getTimestamp() > quota.getLimitTime() * 1000) { |
Contributor
There was a problem hiding this comment.
It's a confusing name :)
We should deprecate the old name limitTime and introduce a new one limitTimeInSec
Not for this PR, we can start a new discussion in the dev mailing list and make it only happen on the next major release @HQebupt
congbobo184
pushed a commit
that referenced
this pull request
Nov 14, 2022
(cherry picked from commit add77aa)
congbobo184
pushed a commit
that referenced
this pull request
Dec 7, 2022
(cherry picked from commit add77aa)
congbobo184
added a commit
that referenced
this pull request
Dec 7, 2022
liangyepianzhou
pushed a commit
that referenced
this pull request
Dec 8, 2022
(cherry picked from commit add77aa)
liangyepianzhou
added a commit
that referenced
this pull request
Dec 8, 2022
…pping the backlog on a topic)
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jan 10, 2023
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jan 10, 2023
…at dropping the backlog on a topic) (cherry picked from commit 95748ca)
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jan 11, 2023
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jan 11, 2023
…at dropping the backlog on a topic) (cherry picked from commit 95748ca)
Technoboy-
pushed a commit
that referenced
this pull request
Feb 8, 2023
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The backlog quota in time does not work due to time unit inconsistency in dropping the backlog on a topic.
The unit of backlog quota limit in time is seconds.
pulsar/pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/BacklogQuota.java
Lines 47 to 52 in 8d13ff8
The time unit inconsistency is here as follows.
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BacklogQuotaManager.java
Lines 221 to 224 in 8d13ff8
Modifications
unify time unit.
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesDocumentation
Check the box below or label this PR directly.
Need to update docs?
doc-requireddoc-not-neededdocdoc-completeMatching PR in forked repository
PR in forked repository: HQebupt#3