Apache9 commented on PR #5104:
URL: https://github.com/apache/hbase/pull/5104#issuecomment-1472116040

   What you proposed is the trick in netty's CompositeByteBuf, where they 
introduce a freed flag to indicate whether the ByteBuf is still valid.
   
   And for AbstractReferenceCountedByteBuf, the code is like this
   ```
       @Override
       boolean isAccessible() {
           // Try to do non-volatile read for performance as the 
ensureAccessible() is racy anyway and only provide
           // a best-effort guard.
           return updater.isLiveNonVolatile(this);
       }
   ```
   
   But  seems we do not have access to the updater field so I think we could go 
with your current approach. The down side is we will add one more boolean for 
each ByteBuff but should be OK?


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