AnonHxy opened a new pull request, #15766:
URL: https://github.com/apache/pulsar/pull/15766
### Motivation
* Synchronized `topicPublishRateLimiter` update action to prevent resource
leakages:
* Thread1: `topicPublishRateLimiter ` is null, and and it will not
invoke `close` in line:1216. Then it stop before line:1219
* Thread2: set `topicPublishRateLimiter` a new value, for example,
`limiter2`. Then thread2 stop.
* Thread1: set `topicPublishRateLimiter ` as
`PublishRateLimiter.DISABLED_RATE_LIMITER` at line:1219
* `limter2` will never be accessable, and may cause resource leakages.
https://github.com/apache/pulsar/blob/eee038870db95e009abde32e89b9d736a9e9cd1c/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java#L1213-L1222
### Modifications
Sync `updatePublishDispatcher()'
### Verifying this change
- [x] Make sure that the change passes the CI checks.
### Documentation
- [x] `no-need-doc`
(Please explain why)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]