Issue with ignite thin client - ReliableChannel

classic Classic list List threaded Threaded
3 messages Options
Hemambara Hemambara
Reply | Threaded
Open this post in threaded view
|

Issue with ignite thin client - ReliableChannel

Ignite thin client create and use ReliableChannel which starts below async
thread, but while closing the channel it is not shutting down this executor
service thread. This should be fine if jvm shutsdown, but it will be a
problem for applications sharing jvm node. Ex: 1 JVM has multiple
applications on app server like Jboss or Mule and each application can be
deployed or undeployed independently. This is not jvm shutdown, it is just
unloading classloader or closing spring context. In this case we are seeing
this background thread is still hanging after closing spring context and
cannot be stopped. Can you please create a jira, I can pick work on that

Probably in onClose method() we need to call shutdown or shutdownNow() based
on your advise

private final ExecutorService asyncRunner =
Executors.newSingleThreadExecutor(
        new ThreadFactory() {
            @Override public Thread newThread(@NotNull Runnable r) {
                return new Thread(r, "thin-client-channel-async-runner");
            }
        }
    );



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ptupitsyn ptupitsyn
Reply | Threaded
Open this post in threaded view
|

Re: Issue with ignite thin client - ReliableChannel

Which version are you using?
A similar issue was fixed for 2.8.1 and 2.9:

On Tue, Nov 17, 2020 at 1:53 AM Hemambara <[hidden email]> wrote:
Ignite thin client create and use ReliableChannel which starts below async
thread, but while closing the channel it is not shutting down this executor
service thread. This should be fine if jvm shutsdown, but it will be a
problem for applications sharing jvm node. Ex: 1 JVM has multiple
applications on app server like Jboss or Mule and each application can be
deployed or undeployed independently. This is not jvm shutdown, it is just
unloading classloader or closing spring context. In this case we are seeing
this background thread is still hanging after closing spring context and
cannot be stopped. Can you please create a jira, I can pick work on that

Probably in onClose method() we need to call shutdown or shutdownNow() based
on your advise

private final ExecutorService asyncRunner =
Executors.newSingleThreadExecutor(
        new ThreadFactory() {
            @Override public Thread newThread(@NotNull Runnable r) {
                return new Thread(r, "thin-client-channel-async-runner");
            }
        }
    );



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Alex Plehanov Alex Plehanov
Reply | Threaded
Open this post in threaded view
|

Re: Issue with ignite thin client - ReliableChannel

In reply to this post by Hemambara
Hello,

This problem was only in Ignite 2.8 with enabled partition awareness. Fixed in Ignite 2.8.1, see [1].


вт, 17 нояб. 2020 г. в 01:53, Hemambara <[hidden email]>:
Ignite thin client create and use ReliableChannel which starts below async
thread, but while closing the channel it is not shutting down this executor
service thread. This should be fine if jvm shutsdown, but it will be a
problem for applications sharing jvm node. Ex: 1 JVM has multiple
applications on app server like Jboss or Mule and each application can be
deployed or undeployed independently. This is not jvm shutdown, it is just
unloading classloader or closing spring context. In this case we are seeing
this background thread is still hanging after closing spring context and
cannot be stopped. Can you please create a jira, I can pick work on that

Probably in onClose method() we need to call shutdown or shutdownNow() based
on your advise

private final ExecutorService asyncRunner =
Executors.newSingleThreadExecutor(
        new ThreadFactory() {
            @Override public Thread newThread(@NotNull Runnable r) {
                return new Thread(r, "thin-client-channel-async-runner");
            }
        }
    );



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/