[ 
https://issues.apache.org/jira/browse/RATIS-434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wei-Chiu Chuang resolved RATIS-434.
-----------------------------------
    Resolution: Cannot Reproduce

I believe this is no longer the case. Except for ratis-example, the only place 
where shutdownNow() is called is preceded by a shutdown() and 
awaitTermination() so I think this is good now.

> StatusRuntimeException is thrown while closing raft client and server
> ---------------------------------------------------------------------
>
>                 Key: RATIS-434
>                 URL: https://issues.apache.org/jira/browse/RATIS-434
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: Lokesh Jain
>            Assignee: Lokesh Jain
>            Priority: Major
>
> We use ManagedChannel#shutdownNow which cancels all the active streams and 
> throws StatusRuntimeException. 
> {code:java}
> org.apache.ratis.thirdparty.io.grpc.StatusRuntimeException: CANCELLED: 
> cancelled before receiving half close
>  at 
> org.apache.ratis.thirdparty.io.grpc.Status.asRuntimeException(Status.java:517)
>  at 
> org.apache.ratis.thirdparty.io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onCancel(ServerCalls.java:272)
>  at 
> org.apache.ratis.thirdparty.io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closed(ServerCallImpl.java:293)
>  at 
> org.apache.ratis.thirdparty.io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1Closed.runInContext(ServerImpl.java:738)
>  at 
> org.apache.ratis.thirdparty.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
>  at 
> org.apache.ratis.thirdparty.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  at java.lang.Thread.run(Thread.java:748)
> {code}
> We should use ManagedChannel#shutdown and ManagedChannel#awaitTermination in 
> order to close the channel properly.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to