Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-06-04 Thread ткаленко кирилл
Folks I suggest closing the ticket with a comment: To kill process with exit code [1], you can use [2] by setting correct values of constructor arguments. Objections? 1 - https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/Ignition.html#KILL_EXIT_CODE 2 - org.apache.ignite.fai

Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-06-02 Thread Andrey Gura
>> And why we should try System.exit()? >> Why we try to stop the node before invoke Runtime#halt()?) By the same >> reasons we should try to stop the process with shutdown hooks >> invocation before Runtime#halt(). Once again: we can't be sure that node will be stopped because we don't manage cod

Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-06-02 Thread Sergey Antonov
Andrey, > And why we should try System.exit()? Why we try to stop the node before invoke Runtime#halt()?) By the same reasons we should try to stop the process with shutdown hooks invocation before Runtime#halt(). вт, 2 июн. 2020 г. в 17:51, Andrey Gura : > > Current implementation StopNodeOrHal

Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-06-02 Thread Andrey Gura
> Current implementation StopNodeOrHaltFH uses Runtime#halt(). This method > doesn't cause shutdown hooks. Why we don't try to stop the node by > System#exit() before Runtime#halt()? And why we should try System.exit()? We invoke halt() because we don't want to invoke any code in shutdown hook. W

Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-06-02 Thread Sergey Antonov
Andrey, Alexey, I can't agree with your position. Current implementation StopNodeOrHaltFH uses Runtime#halt(). This method doesn't cause shutdown hooks. Why we don't try to stop the node by System#exit() before Runtime#halt()? вт, 2 июн. 2020 г. в 17:18, Andrey Gura : > Sergey, Anton, Kirill, >

Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-06-02 Thread Andrey Gura
Sergey, Anton, Kirill, I think we have to do not change anything in FH. At least without enough motivation. Now I see only assumption that it "could be helpful for administration purposes". It isn't enough, I believe. On Tue, Jun 2, 2020 at 4:59 PM ткаленко кирилл wrote: > > Hello, Alexey! > >

Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-06-02 Thread ткаленко кирилл
Hello, Alexey! I didn't quite understand about merge. If we use StopNodeOrHaltFailureHandler with tryStop=true, then if we don't stop node by timeout, we will terminate jvm. Or do you suggest only stopping the node in StopNodeFailureHandler and terminate jvm in StopNodeOrHaltFailureHandler? o

Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-06-02 Thread Alexey Goncharuk
> > How exactly do you want to change the StopNodeFH? > I want to stop JVM with KILL_EXIT_CODE and add an option (constructor > argument of JVM option) for disabling JVM termination. > When the flag is enabled, the behavior is identical to StopNodeOrHaltFH with tryStop=false. In other words, StopNo

Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-06-02 Thread Andrey Gura
Definitely agree with Alexey Goncharuk. Mentioned FH implementations don't terminate JVM. I think returning KILL_EXIT_CODE is bad idea because actually process wasn't terminated using SIGINT. So it contradicts to motivation described in proposal. Also how could it help to administrators. For exam

Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-06-02 Thread Sergey Antonov
Alexey, > How exactly do you want to change the StopNodeFH? I want to stop JVM with KILL_EXIT_CODE and add an option (constructor argument of JVM option) for disabling JVM termination. вт, 2 июн. 2020 г. в 12:54, Alexey Goncharuk : > Sergey, > > How exactly do you want to change the StopNodeFH?

Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-06-02 Thread Alexey Goncharuk
Sergey, How exactly do you want to change the StopNodeFH? The current behavior does not terminate the JVM and its exit code is totally out of our control; one of the use-cases we had in mind for this failure handler is that a user may have other processes running in the same JVM, so we do not want

Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-06-01 Thread Sergey Antonov
Hello, Kirill! I'd prefer to don't create a new implementation of a failure handler. We already have 4 different failure handlers. We will have 6 FH (StopNodeFH with exit code, StopNodeOrHaltFH with exit code), if we go your way. It won't make our product simpler and easier. I think, we must noti

Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-06-01 Thread ткаленко кирилл
I think that [1] and [2] should not be changed, because we can kill another client code in this jvm. I suggest for these purposes to create a new [3] which will be like [1] but with a call [4] after node stop. Objections or comments? [1] - org.apache.ignite.failure.StopNodeFailureHandler [2] -

Re: Re[2]: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-05-25 Thread Dmitriy Pavlov
It seems reasonable to me. Also I would like to propose adding value of Ignition.KILL_EXIT_CODE into javadoc using @value javadoc tag. Dev ops/admins/anyone who admins Ignite may want to know it's value without going to Java code. чт, 21 мая 2020 г. в 09:39, Zhenya Stanilovsky : > > Thank you Se

Re[2]: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-05-20 Thread Zhenya Stanilovsky
Thank you Sergey, as for me — very useful proposal huge +1 here.   >Четверг, 21 мая 2020, 0:51 +03:00 от Sergey Antonov >: >  >I've created the Ignite ticket for this improvement [1]. > >[1] https://issues.apache.org/jira/browse/IGNITE-13047 > >чт, 21 мая 2020 г. в 00:46, Sergey Antonov < anto

Re: [DISCUSS] Ignite process exit code on node stop by failure handler

2020-05-20 Thread Sergey Antonov
I've created the Ignite ticket for this improvement [1]. [1] https://issues.apache.org/jira/browse/IGNITE-13047 чт, 21 мая 2020 г. в 00:46, Sergey Antonov : > Hello, Igniters! > > I'd like to discuss behaviour of Ignite process exit code if the node was > stopped by failure handler [1][2]. At th

[DISCUSS] Ignite process exit code on node stop by failure handler

2020-05-20 Thread Sergey Antonov
Hello, Igniters! I'd like to discuss behaviour of Ignite process exit code if the node was stopped by failure handler [1][2]. At the moment ignite process returns exit code 0 after the stop in all scenarios, except runtime halt by StopNodeOrHaltFH [1]. In this case, the exit code will be 130 [3]