firefly icon indicating copy to clipboard operation
firefly copied to clipboard

Revisit plugin handling of event processing errors

Open awrichar opened this issue 3 years ago • 1 comments

Currently most plugins treat a non-parseable event as a "stop the world" situation. They abort their event loop, log an error, and stop processing messages. We should revisit if this is the best way to handle such problems.

awrichar avatar Aug 11 '22 15:08 awrichar

Tokens: https://github.com/hyperledger/firefly/blob/dbd20c4add426b28dd6676dc73fd44f20585efac/internal/tokens/fftokens/fftokens.go#L515-L524

... returns to handler, which exits the go-routine (closing the WebSocket) - so now that whole Tokens manager for the namespace is a 🧟 - the FF Core server is still running, but it's not doing its job

peterbroadhurst avatar Aug 11 '22 15:08 peterbroadhurst

Easiest way to "improve" this would be to have any plugin failure terminate the whole system. At least that would make it visible instead of having a running-but-very-unhealthy system.

The other route would be more robust reporting of failures and (potentially) attempted recovery, but that requires a lot more thought and design.

awrichar avatar Aug 29 '22 17:08 awrichar