-
Notifications
You must be signed in to change notification settings - Fork 25
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
Use MySqlConnector for async I/O #7
Comments
@bgrainger thanks for stepping up to resolve this issue. Honestly, this sink is not directly impacting application for flow you have posted. Application will not be waiting for data to be serialized as I'm using pub-sub pattern. However, I'd love to see what will be impact if underlying connector get swapped. Please fee free to raise a pull request and I'm all up to evaluate it. |
Did you have any problems moving the project to MySqlConnector? I'm also having a problem because of two projects referencing different libraries. |
If at all possible, you will want to avoid referencing both MySql.Data and MySqlConnector. Having both running will create duplicate connection pools, which is inefficient. MySql.Data also has a number of outstanding bugs that might affect your application. But if it's unavoidable (because some dependencies haven't updated), you may be able to resolve problems by using extern aliases; see the comments on mysql-net/MySqlConnector#189 for details. |
The MySqlSink code uses
ExecuteNonQueryAsync
. It's a long-standing bug in MySql.Data (bug 70111) that async I/O is not implemented correctly; thus all these methods will actually run synchronously. (See also here and here on Stack Overflow.)To fix this, you could switch to https://github.com/mysql-net/MySqlConnector, an OSS replacement for MySql.Data that supports true asynchronous I/O.
If you're interested in this, I'd be happy to open a PR.
The text was updated successfully, but these errors were encountered: