Bug #79983 Catch and propagate errors in plugin functions
Submitted: 14 Jan 2016 11:53 Modified: 2 Feb 2016 3:10
Reporter: Mats Kindahl Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Router Severity:S3 (Non-critical)
Version:2.0.2 OS:Any
Assigned to: CPU Architecture:Any

[14 Jan 2016 11:53] Mats Kindahl
Description:
Exceptions thrown inside the `start()` function in the Harness does not currently propagate to the main router thread. The effect is that `terminate()` is called whenever there is an exception thrown inside the start function, which give uninformative error messages.

How to repeat:
Write a plugin that throws an exception in the `start()` function and run the router.

Suggested fix:
Catch exceptions inside the plugin functions and propagate them to the Harness. The Harness should, in turn, log them properly.
[2 Feb 2016 3:10] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Router 2.0.4 release, and here's the changelog entry:

An exception thrown inside a plugin would cause the process to be
terminated unconditionally.

Thank you for the bug report.