Hi guys,
I'm facing a large memory consumption in io.netty.buffer.PoolThreadCache
.
This is happening in our CI environment, where lots of tests are executed, and lots of index / search / delete are performed in ES.
I don't believe this is a memory leak at all.
The problem is: our Junits must run accordingly.
Checking the revision when the problem started to happen, it seems that this problem is somehow related to a given piece of code like this:
void addDocuments(...)
{
BulkProcessor bulkProcessor = ...
while(...) // huge loop
{
bulkProcessor.add(...);
}
bulkProcessor.flush();
bulkProcessor = null;
}
This method is called lots and lots of time during our tests.
I though when flush()
was called, all in-memory requirements for the given requests would be immediately freed, but apparently they are not.
In this case, what could be done? Is there an option to force flush be synced, so the memory is freed immediately?
UPDATE:
ES version: 5.4.3
Thanks in advance!