Repository navigation
[fix][broker] Fix namespace backlog quota check with retention. - #17706
Merged
Merged
Conversation
Jason918
requested review from
MarvinCai,
codelipenghui and
michaeljmarshall
September 18, 2022 03:44
michaeljmarshall
approved these changes
Sep 18, 2022
michaeljmarshall
left a comment
Member
There was a problem hiding this comment.
LGTM. Thanks @Jason918!
added 2 commits
September 18, 2022 16:20
| protected boolean checkBacklogQuota(BacklogQuota quota, RetentionPolicies retention) { | ||
| if (retention == null || retention.getRetentionSizeInMB() <= 0 || retention.getRetentionTimeInMinutes() <= 0) { | ||
| if (retention == null | ||
| || (retention.getRetentionSizeInMB() <= 0 && retention.getRetentionTimeInMinutes() <= 0)) { |
Contributor
There was a problem hiding this comment.
Looks like the added test can't cover this branch?
Contributor
Author
There was a problem hiding this comment.
@codelipenghui As mentioned in the issue. The test in L3417 won't fail before this change.
Contributor
Author
There was a problem hiding this comment.
And the case of (retention.getRetentionSizeInMB() <= 0 && retention.getRetentionTimeInMinutes() <= 0) is the default setting, it's covered by previous unit tests.
codelipenghui
approved these changes
Sep 19, 2022
Technoboy-
approved these changes
Sep 19, 2022
Technoboy-
pushed a commit
that referenced
this pull request
Sep 19, 2022
Jason918
added a commit
that referenced
this pull request
Sep 26, 2022
(cherry picked from commit c6967cd)
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Sep 28, 2022
congbobo184
pushed a commit
that referenced
this pull request
Nov 10, 2022
(cherry picked from commit c6967cd)
congbobo184
pushed a commit
that referenced
this pull request
Nov 30, 2022
(cherry picked from commit c6967cd)
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.
Fixes #17707
Motivation
checkBacklogQuotafails when both retention.size and backlogQuota.size is -1. Same as time check.Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc-required(Your PR needs to update docs and you will update later)
doc-not-neededbug
doc(Your PR contains doc changes)
doc-complete(Docs have been already added)