Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing poolCluster 'remove' event #60

Closed
mafischer opened this issue Jun 15, 2019 · 1 comment
Closed

missing poolCluster 'remove' event #60

mafischer opened this issue Jun 15, 2019 · 1 comment

Comments

@mafischer
Copy link
Contributor

mafischer commented Jun 15, 2019

https://github.com/mysqljs/mysql#poolcluster

as shown in the mysql poolCluster documentation, the poolCluster emits a remove event when a node is removed.

// Target Group : SLAVE1-2, Selector : order
// If can't connect to SLAVE1, return SLAVE2. (remove SLAVE1 in the cluster)
poolCluster.on('remove', function (nodeId) {
  console.log('REMOVED NODE : ' + nodeId); // nodeId = SLAVE1
});

mariadb does not support this:

poolCluster.on('remove', function (nodeId) {
TypeError: poolCluster.on is not a function
@rusher
Copy link
Collaborator

rusher commented Jun 17, 2019

Thanks for pointing that out !
done with commit 95f6068 .

This will be in the next version (2.0.6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants