Search before asking
Read release policy
Version
ConcurrentBitSet was introduced in Pulsar 2.4.0
Minimal reproduce step
ConcurrentBitSet claims to be a multi-thread safe class.
There are several problems:
- It contains invalid use of
StampedLock class. It isn't using write lock, which makes the use of StampedLock useless.
- Many used methods aren't handled. for example
.clear() method.
ConcurrentBitSet.clear is called here:
|
bitSet.clear(msgId.getBatchIndex()); |
What did you expect to see?
- ConcurrentBitSet should properly use StampedLock
- It should make most methods thread safe and prevent usage of other non-thread safe fields.
What did you see instead?
ConcurrentBitSet is not thread safe
Anything else?
This is related to issue #22352
Are you willing to submit a PR?
Search before asking
Read release policy
Version
ConcurrentBitSet was introduced in Pulsar 2.4.0
Minimal reproduce step
ConcurrentBitSet claims to be a multi-thread safe class.
There are several problems:
StampedLockclass. It isn't using write lock, which makes the use of StampedLock useless..clear()method.ConcurrentBitSet.clear is called here:
pulsar/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java
Line 335 in 35bb021
What did you expect to see?
What did you see instead?
ConcurrentBitSet is not thread safe
Anything else?
This is related to issue #22352
Are you willing to submit a PR?