bbeaudreault opened a new pull request, #5104: URL: https://github.com/apache/hbase/pull/5104
This felt like the cleanest way to solve this case, but open to other opinions. Whether we need to checkRefCount is directly tied to whether we use NONE recycler. A couple other options I considered: - Create a new inheritance hierarchy, i.e. OnHeapSingleByteBuff, etc. This felt like it'd only complicate an already complex system. - Update the SingleByteBuff and MultiByteBuff constructors to take a new `boolean onHeap` or `boolean shouldCheckRefCount`. This felt more error prone because it's too easy for someone to forget to pass the correct boolean value for the corresponding recycler. I added a basic test to validate that we only call checkRefCount for non-NONE recyclers. Beyond that, I think our existing ample coverage should suffice? Let me know if you'd like to see a particular test. -- 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]
