lhotari edited a comment on issue #10433:
URL: https://github.com/apache/pulsar/issues/10433#issuecomment-831885032


   When looking more at the possible race condition, the previous explained 
scenario seems to be possible with a slight variation to it. It seems that 
invalidation while the entry is in use is possible, but the remaining steps are 
different.
   
   It might sound like a very unlikely situation, but it seems that the problem 
of this issue is also very rare. With enough operations, a very unlikely call 
path will eventually get executed.
   
   I was looking for different ways how entries could get invalidated and 
whether there are locks in place to ensure that an entry doesn't simulaneously 
get invalidated twice. There isn't a solution for this. I believe that the fix 
would be to ensure that an entry cannot be invalidated twice. The method for 
invalidation should be different than calling `release` so that it's possible 
to track when the entry is invalidated. I'll work on a PR with a proposal to 
have a simple fix for the problem this way. The changes will be fairly simple.


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to