You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "Alexey V. Ryazanov" <al...@gmail.com> on 2015/10/08 06:31:54 UTC

How can I be sure grid is actualy stopped?

I stop grid by

/G.stop("myGridName", false);/

It seems to me it takes some time to stop. Can I be notified somehow when
grid has actually been stopped? Cause now I have to use /Thread.sleep()/ in
order to take a time before I can start grid again.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-can-I-be-sure-grid-is-actualy-stopped-tp1571.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How can I be sure grid is actualy stopped?

Posted by vkulichenko <va...@gmail.com>.
Alexey,

This exception means that one of the nodes tried to send a message to a node
that already stopped. This can happen in some cases, so I think you can
safely ignore it if it doesn't cause any other issues.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-can-I-be-sure-grid-is-actualy-stopped-tp1571p1580.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How can I be sure grid is actualy stopped?

Posted by "Alexey V. Ryazanov" <al...@gmail.com>.
/Thread.currentThread()/ returns same thread instance (main) for both
Ignition.start() and Ignition.stop() methods calls.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-can-I-be-sure-grid-is-actualy-stopped-tp1571p1576.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How can I be sure grid is actualy stopped?

Posted by dsetrakyan <ds...@apache.org>.
Alexey V. Ryazanov wrote
> I run a bunch of tests. Every test starts several grids with different
> names before execution and stops them after execution complete.
> If I waste some time (~ 5 sec) in Thread.sleep(), all goes fine.
> If I run test one by one without any pauses, the first one works fine, but
> all others throw exception (see below) when trying to stop grids in his
> turn.

Ignite has many tests where we start and stop nodes without any sleeps. From
what I am seeing, it seems like you do not synchronously wait for all nodes
to stop. Are you certain that you are stopping all the nodes in the same
thread that executes the next test?




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-can-I-be-sure-grid-is-actualy-stopped-tp1571p1574.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How can I be sure grid is actualy stopped?

Posted by "Alexey V. Ryazanov" <al...@gmail.com>.
I run a bunch of tests. Every test starts several grids with different names
before execution and stops them after execution complete.
If I waste some time (~ 5 sec) in Thread.sleep(), all goes fine.
If I run test one by one without any pauses, the first one works fine, but
all others throw exception (see below) when trying to stop grids in his
turn.






--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-can-I-be-sure-grid-is-actualy-stopped-tp1571p1573.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How can I be sure grid is actualy stopped?

Posted by vkulichenko <va...@gmail.com>.
Hi Alexey,


Alexey V. Ryazanov wrote
> I stop grid by
/
> G.stop("myGridName", false);
/
> 
> It seems to me it takes some time to stop. Can I be notified somehow when
> grid has actually been stopped? Cause now I have to use 
/
> Thread.sleep()
/
>  in order to take a time before I can start grid again.

First of all, you should use Ignition.stop(..) instead of G.stop(..),
because the latter is not part of the public API.

Anyway, stop method is synchronous, so when it's finished, you should be
able to start Ignite again. Does it behave differently for you? When happens
when you try to restart?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-can-I-be-sure-grid-is-actualy-stopped-tp1571p1572.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.