]> source.dussan.org Git - sonarqube.git/commit
SONAR-7908 correctly close ES TransportClient
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 4 Aug 2016 15:56:35 +0000 (17:56 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 5 Aug 2016 13:45:01 +0000 (15:45 +0200)
commitb6069267bdebb809c93b4fe23cb85cd2b6d3bf0a
treec8d3cb61eb1eb1fab5e0bae9b36769feb93e35d0
parent099d46d39848b39df264fc75592868d4c9ca5e56
SONAR-7908 correctly close ES TransportClient

in order to stop all the ES threads and to not generate
Tomcat warnings:

2016.08.04 12:10:34 WARN  web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[Her][transport_client_worker][T#1]{New I/O worker #1}] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
 sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:198)
 sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:117)
 sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
 sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
 org.jboss.netty.channel.socket.nio.SelectorUtil.select(SelectorUtil.java:68)
 org.jboss.netty.channel.socket.nio.AbstractNioSelector.select(AbstractNioSelector.java:434)
 org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:212)
 org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
 org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
 org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
 org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 java.lang.Thread.run(Thread.java:745)
server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
server/sonar-server/src/main/java/org/sonar/server/es/EsClient.java
server/sonar-server/src/main/java/org/sonar/server/es/EsClientStopper.java [new file with mode: 0644]
server/sonar-server/src/main/java/org/sonar/server/search/EsSearchModule.java
server/sonar-server/src/test/java/org/sonar/server/es/EsClientStopperTest.java [new file with mode: 0644]
server/sonar-server/src/test/java/org/sonar/server/es/EsClientTest.java
server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java
server/sonar-server/src/test/java/org/sonar/server/search/EsSearchModuleTest.java