gianm opened a new pull request, #12521:
URL: https://github.com/apache/druid/pull/12521

   Many tests had problems where a direct ByteBuffer would be allocated
   and then not freed. This is bad because it causes flaky tests.
   
   To fix this:
   
   1) Add ByteBufferUtils.allocateDirect(size), which returns a ResourceHolder.
      This makes it easy to free the direct buffer. Currently, it's only used
      in tests, because production code seems OK.
   
   2) Update all usages of ByteBuffer.allocateDirect (off-heap) in tests either
      to ByteBuffer.allocate (on-heap, which are garbaged collected), or to
      ByteBufferUtils.allocateDirect (wherever it seemed like there was a good
      reason for the buffer to be off-heap). Make sure to close all direct
      holders when done.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to