Skip to content
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 time based backlog quota. #11509

Merged
merged 6 commits into from
Aug 6, 2021

Conversation

MarvinCai
Copy link
Contributor

Fixes #11404

Motivation

Time based backlog quota type message_age is set separately but when check backlog we're only checking against destination_storage type.
So fix to loop through all BacklogQuotaType when checking if backlog exceeded.

Verifying this change

This change added tests and can be verified as follows:

  • Added unit test.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): no
  • The public API: yes
  • The schema: no
  • The default values of configurations: no
  • The wire protocol: no
  • The rest endpoints: no
  • The admin cli options: no
  • Anything that affects deployment: no

Added default implementation to make Admin Topic/Namespace backlog quota related API backward compatible.

Documentation

For contributor

For this PR, do we need to update docs? No

  • Doc should be auto generated.

Time based backlog quota type message_age is set separately but when check backlog we're only checking against destination_storage type.
So fix to loop through all BacklogQuotaType when checking if backlog exceeded.
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good!

LGTM

probably we will have to update some docs (I am not sure)

@Anonymitaet Anonymitaet added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Jul 30, 2021
@MarvinCai
Copy link
Contributor Author

@Anonymitaet updated doc, please take a look.

Copy link
Contributor

@codelipenghui codelipenghui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just left some minor comments.

@codelipenghui codelipenghui added this to the 2.9.0 milestone Aug 3, 2021
@codelipenghui codelipenghui added release/2.8.1 doc-required Your PR changes impact docs and you will update later. area/admin and removed doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. labels Aug 3, 2021
@Anonymitaet Anonymitaet added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-required Your PR changes impact docs and you will update later. labels Aug 3, 2021
Copy link
Contributor

@hangc0276 hangc0276 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!
I left a comment.

@MarvinCai
Copy link
Contributor Author

/pulsarbot run-failure-checks

2 similar comments
@MarvinCai
Copy link
Contributor Author

/pulsarbot run-failure-checks

@MarvinCai
Copy link
Contributor Author

/pulsarbot run-failure-checks

@hangc0276 hangc0276 merged commit e82df7c into apache:master Aug 6, 2021
LeBW pushed a commit to LeBW/pulsar that referenced this pull request Aug 9, 2021
Fixes apache#11404

### Motivation
Time based backlog quota type message_age is set separately but when check backlog we are only checking against destination_storage type.
So fix to loop through all BacklogQuotaType when checking if backlog exceeded.

### Modification
* Added unit test.
* Added default implementation to make Admin Topic/Namespace backlog quota related API backward compatible.
hangc0276 pushed a commit that referenced this pull request Aug 12, 2021
Fixes #11404

### Motivation
Time based backlog quota type message_age is set separately but when check backlog we are only checking against destination_storage type.
So fix to loop through all BacklogQuotaType when checking if backlog exceeded.

### Modification
* Added unit test.
* Added default implementation to make Admin Topic/Namespace backlog quota related API backward compatible.

(cherry picked from commit e82df7c)
@hangc0276 hangc0276 added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Aug 12, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
Fixes apache#11404

### Motivation
Time based backlog quota type message_age is set separately but when check backlog we are only checking against destination_storage type.
So fix to loop through all BacklogQuotaType when checking if backlog exceeded.

### Modification
* Added unit test.
* Added default implementation to make Admin Topic/Namespace backlog quota related API backward compatible.
momo-jun added a commit to momo-jun/pulsar that referenced this pull request Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/admin cherry-picked/branch-2.8 Archived: 2.8 is end of life doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. release/2.8.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Broker] Backlog Quota not properly fetched for message_age BacklogQuotaType
5 participants