lhotari opened a new issue, #25991:
URL: https://github.com/apache/pulsar/issues/25991

   ### Search before reporting
   
   - [x] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Read release policy
   
   - [x] I understand that [unsupported 
versions](https://pulsar.apache.org/contribute/release-policy/#supported-versions)
 don't get bug fixes. I will attempt to reproduce the issue on a supported 
version of Pulsar client and Pulsar broker.
   
   
   ### User environment
   
   master branch code base
   
   ### Issue Description
   
   RoaringBitmaps aren't thread safe even when using ReadWriteLock or 
StampedLock.
   The reason for this is that read operations might also mutate internal data 
structures.
   
   Thread safety is briefly documented here:
   https://github.com/RoaringBitmap/RoaringBitmap#thread-safety
   
   There are reported issues about thread safety (including read operations) 
and they have been closed and won't get fixed in the project. Some read 
operations update an internal cache and it might be possible that they also 
mutate other internal data structures. 
   
   One of the possible workarounds is to keep using ReadWriteLock and analyze 
the source code with an AI agent to ensure that a read operation doesn't mutate 
data structures making it safe to use ReadWriteLock or StampedLock. For read 
operations that mutate state, a write lock can be acquired.
   
   ### Error messages
   
   ```text
   
   ```
   
   ### Reproducing the issue
   
   n/a
   
   ### Additional information
   
   n/a
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
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]

Reply via email to