#54 remove system.exist

closed-rejected
nobody
server (27)
5
2008-06-06
2008-04-24
No

A patch that replace system exits with Runtime-Exceptions. This improves the capability to use zookeeper embedded in other applications by not crashing the whole application in case ZK crashs.

Discussion

  • Stefan Groschupf

    • summary: remove system.exista --> remove system.exist
     
  • Benjamin Reed

    Benjamin Reed - 2008-04-25

    Logged In: YES
    user_id=154690
    Originator: NO

    -1 Unfortunately this patch will not do what you want. When a fatal error occurs things need to shutdown, both so that you don't do damage and so that you can restart. If you just throw an exception, there will still be some threads around and some ports open.

     
  • Stefan Groschupf

    Logged In: YES
    user_id=396197
    Originator: YES

    I see. So what would be the best way to solve that?
    Looks like all other would be some major re-factoring to be able to shutdown all services cleanly.

     
  • Benjamin Reed

    Benjamin Reed - 2008-04-25

    Logged In: YES
    user_id=154690
    Originator: NO

    I think it is doable without much change. We actually shutdown the servers in our test cases. The tricky part is that the shutdown in coming from the inside. Perhaps we just need have an external thread that we can wakeup when we want to shutdown. We need to look at the individual cases to see the best course of action after that thread on woken up so that nothing bad happens before shutdown. In most cases, the error is really severe unexpected cases, so we don't want things to proceed.

     
  • Benjamin Reed

    Benjamin Reed - 2008-06-06
    • status: open --> closed-rejected
     
  • Benjamin Reed

    Benjamin Reed - 2008-06-06

    Logged In: YES
    user_id=154690
    Originator: NO

    Closing, since the patch is not correct. We should probably open a feature request to track this.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks