Java client -- slow to shutdown

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Java client -- slow to shutdown

Toby Corkindale-2
Hi,
I'm using the Java client via protocol buffers to Riak.
(Actually I'm using it via Scala 2.11.8 on OpenJDK 8)

After calling client.shutdown(), there is always a delay of 4 seconds before the app actually exits. Why is this, and what can I do about it?

To demonstrate the issue, use these files:

If you put both of them in a fresh directory and then run "sbt", it should grab various dependencies and stuff, and then you can use "compile" and "run" commands.
(You'll need to do "export RIAK_SERVER=my.riak.cluster.net" in the shell before you run sbt)

If you do "run" a few times, you'll see it always takes four seconds to get back to the sbt prompt. If you comment out the two riak statements in the source code (the connection and shutdown), then "run" a few times, it takes zero seconds.

I've tested this outside of sbt and the same issue exists.. it's just easier to make a quick demo that works inside sbt.


Cheers
Toby




_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Java client -- slow to shutdown

Luke Bakken
Hi Toby -

Thanks for reporting this. We can continue the discussion via GH issue #689.

--
Luke Bakken
Engineer
[hidden email]

On Wed, Nov 23, 2016 at 9:58 PM, Toby Corkindale <[hidden email]> wrote:

> Hi,
> I'm using the Java client via protocol buffers to Riak.
> (Actually I'm using it via Scala 2.11.8 on OpenJDK 8)
>
> After calling client.shutdown(), there is always a delay of 4 seconds before
> the app actually exits. Why is this, and what can I do about it?
>
> To demonstrate the issue, use these files:
> https://gist.github.com/TJC/9a6a174cb1419a7c32e8018c5a495e3d
>
> If you put both of them in a fresh directory and then run "sbt", it should
> grab various dependencies and stuff, and then you can use "compile" and
> "run" commands.
> (You'll need to do "export RIAK_SERVER=my.riak.cluster.net" in the shell
> before you run sbt)
>
> If you do "run" a few times, you'll see it always takes four seconds to get
> back to the sbt prompt. If you comment out the two riak statements in the
> source code (the connection and shutdown), then "run" a few times, it takes
> zero seconds.
>
> I've tested this outside of sbt and the same issue exists.. it's just easier
> to make a quick demo that works inside sbt.
>
> Also reported as https://github.com/basho/riak-java-client/issues/689
>
> Cheers
> Toby

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Loading...