Skip to content

[fix][broker]Close publishLimiter when disable it - #15520

Merged
Technoboy- merged 2 commits into
apache:masterfrom
AnonHxy:opt_close_publishRatelimiter_update
May 11, 2022
Merged

[fix][broker]Close publishLimiter when disable it#15520
Technoboy- merged 2 commits into
apache:masterfrom
AnonHxy:opt_close_publishRatelimiter_update

Conversation

@AnonHxy

@AnonHxy AnonHxy commented May 10, 2022

Copy link
Copy Markdown
Contributor

Motivation

Close topicPublishRateLimiter when it is disabled to prevent resource leakages

Modifications

Close topicPublishRateLimiter when it change from enable to disable

Verifying this change

  • Make sure that the change passes the CI checks.

  • no-need-doc
    (Please explain why)

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label May 10, 2022
@AnonHxy

AnonHxy commented May 10, 2022

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

Comment thread pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java Outdated
@Technoboy-

Copy link
Copy Markdown
Contributor

Hi @lhotari
#10384 has defined PublishRateLimiter to extend AutoCloseable with close signs exception, and cause to catch the exception when updated. I think we should override the method in this interface to avoid throwing exceptions.

@Technoboy- Technoboy- added type/bug The PR fixed a bug or issue reported a bug area/broker release/2.10.1 labels May 11, 2022
@Technoboy- Technoboy- added this to the 2.11.0 milestone May 11, 2022
@AnonHxy
AnonHxy force-pushed the opt_close_publishRatelimiter_update branch from 63c6db6 to 6bbeb80 Compare May 11, 2022 09:07
@AnonHxy

AnonHxy commented May 11, 2022

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@Technoboy-
Technoboy- merged commit e8c971a into apache:master May 11, 2022
codelipenghui pushed a commit that referenced this pull request May 20, 2022
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request May 23, 2022
(cherry picked from commit e8c971a)
(cherry picked from commit 761c42d)
mattisonchao pushed a commit that referenced this pull request May 25, 2022
@mattisonchao mattisonchao added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker cherry-picked/branch-2.9 Archived: 2.9 is end of life cherry-picked/branch-2.10 doc-not-needed Your PR changes do not impact docs release/2.9.3 release/2.10.1 type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants