-
-
Notifications
You must be signed in to change notification settings - Fork 666
Description
In the mysql library which is used as inspiration for this library and has quite similar API, PoolCluster has the attribute restoreNodeTimeout: a node which failed the number of times removeNodeErrorCount can be recovered to the cluster after the time specified in restoreNodeTimeout.
mysql2 has a more radical behavior by which a node is removed from the cluster forever after the removeNodeErrorCount
In our use case, we have several remote nodes; anytime one of the nodes could become unavailable, and be later recovered. With the current mysql2 behavior it will not be included again in the cluster; eventually, all nodes could become unavailable at some points, meaning the cluster will be empty, even when some nodes are available.
Rather than trying to solve it on the application, by detecting that a node has been removed from the cluster and adding it again, it would be nice if mysql2 could recover those nodes after an specified time, in a similar way as mysql implements.