-
Notifications
You must be signed in to change notification settings - Fork 2
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
MySQL 5.6 support #20
Conversation
https://travis-ci.org/twingly/ecco/builds/142764339 broke, not sure if this will fix it but feel better to use the latest version before debugging any more.
To see why it's taking so long
Without haveged Travis CI would abort the build at `gem install bundler` due to inactivity for 10 min. JRuby needs lots of entropy to start up https://github.com/jruby/jruby/wiki/Improving-startup-time#ensure-your-system-has-adequate-entropy Entropy was most likely better in the container based environment before cc768d2
Introduced with MySQL 5.6: https://dev.mysql.com/doc/internals/en/rows-event.html#write-rows-eventv2 Defined in mysql-binlog-connector-java: https://github.com/shyiko/mysql-binlog-connector-java/blob/05bc0952c5de64fc836fcb9ca36f4b4570d21a72/src/main/java/com/github/shyiko/mysql/binlog/event/EventType.java#L169-L183
EventType::DELETE_ROWS, | ||
EventType::EXT_DELETE_ROWS, |
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.
Might be possible to configure MySQL to use v1 ROWS_EVENT but it feels better to support both v1 and v2.
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.
Shouldn't we have specs for both then? You added to the array here, but replaced them in the specs (e.g. WRITE_ROWS -> EXT_WRITE_ROWS)
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.
Shouldn't we have specs for both then? You added to the array here, but replaced them in the specs (e.g. WRITE_ROWS -> EXT_WRITE_ROWS)
Not sure it's worth it, since we need to stop and reconfigure MySQL to have multiple specs.
I'll probably refactor this and rely on https://github.com/shyiko/mysql-binlog-connector-java/blob/05bc0952c5de64fc836fcb9ca36f4b4570d21a72/src/main/java/com/github/shyiko/mysql/binlog/event/EventType.java#L191-L207 and add our own types that don't vary depending on the MySQL config and/or version.
But first step is just to get everything working with 5.6s default config.
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.
I'll probably refactor this and rely on https://github.com/shyiko/mysql-binlog-connector-java/blob/05bc0952c5de64fc836fcb9ca36f4b4570d21a72/src/main/java/com/github/shyiko/mysql/binlog/event/EventType.java#L191-L207 and add our own types that don't vary depending on the MySQL config and/or version.
There are some issues with JRuby and Java type, some of the issues are fixed by using EventType.java_send(:isWrite, [EventType], type)
. Might be easier to keep the constants, but ensure we send the same type-strings as before (otherwise Bruce will break).
To keep the API compatibility
@@ -26,7 +26,7 @@ | |||
subject.on_event(table_event) | |||
subject.on_event(row_event) | |||
|
|||
expect(actual_type).to eq(row_event_type) | |||
expect(actual_type).to eq("WRITE_ROWS") |
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.
Will try to make this more generic, or more specific that it's a write row event (now it's "hidden" in the spec context)
Fewer rows, easier to read.
MySQL 5.6 required a lot more memory than the default 512 MiB
Done. |
LGTM 👍 |
#on_row_event, #on_save_position
specs between 5.5 and 5.6 (different order)https://docs.travis-ci.com/user/database-setup/#MySQL-5.6