Elek, Marton created HDDS-377:
---------------------------------

             Summary: Make the ScmClient closable and stop the started threads
                 Key: HDDS-377
                 URL: https://issues.apache.org/jira/browse/HDDS-377
             Project: Hadoop Distributed Data Store
          Issue Type: Improvement
          Components: SCM Client
            Reporter: Elek, Marton
             Fix For: 0.2.1


Current ScmClient class opens additional threads which won't be closed. For 
example SCMCLI can't stop because of this running thread:

{code}
"nioEventLoopGroup-2-1" #15 prio=10 os_prio=0 tid=0x00007f1c84c74800 nid=0x77f4 
runnable [0x00007f1c52238000]
   java.lang.Thread.State: RUNNABLE
        at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
        at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
        at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93)
        at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
        - locked <0x0000000771adf7b0> (a 
org.apache.ratis.shaded.io.netty.channel.nio.SelectedSelectionKeySet)
        - locked <0x0000000771ae12d8> (a java.util.Collections$UnmodifiableSet)
        - locked <0x0000000771ae1010> (a sun.nio.ch.EPollSelectorImpl)
        at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
        at 
org.apache.ratis.shaded.io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
        at 
org.apache.ratis.shaded.io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:753)
        at 
org.apache.ratis.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:409)
        at 
org.apache.ratis.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
        at 
org.apache.ratis.shaded.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
        at java.lang.Thread.run(Thread.java:745)

{code}

(Note this is netty, but the Grpc based xceiver also have some special threads).

I propose to make ScmClient auto-closable and stop the XceiverClientManager in 
case of close. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to