pulsar
pulsar copied to clipboard
[Bug] BucketDelayedDeliveryTracker.containsMessage is not thread-safe, but it's called from another thread
Search before asking
- [X] I searched in the issues and found nothing similar.
Read release policy
- [X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
Version
any released version of Pulsar
Minimal reproduce step
There's code that calls BucketDelayedDeliveryTracker.containsMessage.containsMessage from another thread https://github.com/apache/pulsar/blob/1c53841cc7f585bdd8ff6702d74f37491d8cc9c6/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java#L389-L392
What did you expect to see?
Having thread-safety aspects considered in the BucketDelayedDeliveryTracker implementation.
What did you see instead?
There seem to be thread safety issues in BucketDelayedDeliveryTracker
Anything else?
No response
Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!