fwaris/FsStorm

runComponent doesn't know the child async threw an exception

Closed this issue · 7 comments

Consequently, you have a dead component that Storm doesn't know it needs to restart.

https://github.com/fwaris/FsStorm/blob/master/FsStorm/StormProcessing.fs#L57
Perhaps it needs Async.Catch?

Actually, maybe this is the problem:
https://github.com/fwaris/FsStorm/blob/master/FsStorm/Storm.fs#L163
https://github.com/fwaris/FsStorm/blob/master/FsStorm/Storm.fs#L181

Maybe have the handler that swallows the exception inside the while loop if we want the component to keep running?
https://gist.github.com/et1975/9db8525820d7e18083b2

Tangential: is there a reason Logging is not using Storm's {command:log} and writes to its own file instead?
Would have been nice to see what's happening directly from Storm UI.

You are right in that we should be using storm logging in the core FsStorm componentry.
I needed better logging during development so introduced FsLogging to debug.

Let my update to remove any dependency on FsLogging, in FsStorm. Hopefully this will get around the other issue you mention.

As an aside, I am working to add Kerberos security. Any sizeable Storm environment will likely be secure and FsStorm does not currently work in that environment. This looks like a substantial effort, at least at the outset.

How do I reopen this thing?

I guess I shouldn't have mentioned logging, the original (and much bigger) issue is that Storm doesn't know the component is dead and needs to be restarted. That hasn't changed and I'll submit a pull request for that.

I have reopend

we can add Environment.Exit(1) in all top level exception handlers

If you look here https://github.com/fwaris/FsStorm/blob/master/FsStorm/StormProcessing.fs#L29,

The main thread is hung to keep the async processing running.

As suggested, Environment.Exit(1) in the top level handlers would be best way to kill the component and let storm re-start it.

Let me know what you think.

Logging and exception handling seems to be working well at this point, closing.