ivankelly commented on issue #913: Refactor FileInfo locking and refcounting out IndexPersistenceMgr URL: https://github.com/apache/bookkeeper/pull/913#issuecomment-355225374 @yzang thanks for looking again. It's really good to have someone thinking deeply about this stuff to shake out the issues. Regarding the proposed race, in step 5, markDead will compareAndSet on the refCount. If refCount is 0, it sets to -0xDEAD. In step 6, when thread A calls tryRetain, it will see refCount is less than 0, since -0xDEAD is negative, and so return false.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
