-
Notifications
You must be signed in to change notification settings - Fork 685
Allow users to define ctl_connection_settings and the option to fail when table information is unavailable #176
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
Conversation
…k changes in a given cluster rather than default, force failure on failure to get TableMetadata
…f BinLogStreamReader, added charset for ctl_connection_settings
…it being a generic exception
Merge noplay's changes in to optional_ctl_connection_settings, add test for metadata unavailable error
By the way, if you want me to squash these commits, let me know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, but a test for the ctl connection settings would be great.
@@ -37,6 +37,9 @@ _build | |||
*.xml | |||
*.iml | |||
|
|||
# Temp vim .swp s | |||
*.swp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pro tip: this should go in your global ignore file instead. Defaults to: $HOME/.config/git/ignore
This is not blocking for merge though.
self.__connection_settings = connection_settings | ||
self.__connection_settings["charset"] = "utf8" | ||
if not connection_settings.get("charset"): | ||
self.__connection_settings["charset"] = "utf8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.__connection_settings.setdefault("charset", "utf8")
I agree the change sound good. If you can add a test for ctl_connection_settings it will be perfect |
…nore, made default charset applying simpler, fixed travis for new mysql servers necessary for ctl_connection_settings test (including removing usage of mysql sandbox in mysql57 tests to bring it in line with what's going on in mysql56 tests)
Tests are done and working now (sorry for commit spam earlier, they're all squashed now) |
\o/ I started looking at implementing the tests myself, and I have to admit I became quite lazy when looking at the travis mess. Thank you very much for your work. All looks good to me. |
Resolves #56
To allow users to create their own secondary database that tracks schema changes if they want to ensure they will always have table_metadata (in case of a dropped table before a message can be picked up). It also adds an (optional) parameter that makes the BinLogStreamReader raise an exception if there is an issue getting schema information for a query. This allows the library to stay low-level while giving users the option of alleviating this issue.