ElasticSearch Java TransportClient missing byte []

ElasticSearch Java TransportClient 5.5.1 is a byte array leak. Even if I just connect and close, commenting on the code between them, it flows.

The code:

try (PreBuiltTransportClient preBuiltTransportClient = new PreBuiltTransportClient(settings)) {
     try(TransportClient transportClient=preBuiltTransportClient.addTransportAddress(
            new InetSocketTransportAddress(InetAddress.getByName(endPoint),javaPort))){
         //do something
     }
}

Plugin download log (may indicate something):

Downloaded Connection Log VisualVM Heap dump shows byte [] of allocated size on the heap (after forced garbage collection):

Visualvm

It seems to have the same problem as here: https://discuss.elastic.co/t/are-there-memory-leaks-in-elasticsearchs-transportclient-5-4-3-or-is-my-code- flawed / 91989/5

Not sure if this is appropriate, but I am using Spring boot in the same project.

Any ideas?

EDIT:

This seems to be related to compression:

enter image description here

EDIT2:

TransportClientNodesService.addTransportAddresses

+4
1

: https://github.com/elastic/elasticsearch/issues/26048

, netty .

io.netty.allocator.type = unooled .

System.setProperty("io.netty.allocator.type", "unpooled");

-Dio.netty.allocator.type=unpooled 
0

Source: https://habr.com/ru/post/1682948/


All Articles