-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
DBZ-7085 Add MariaDB driver and use with MariaDB profile #4975
Conversation
.with(MySqlConnectorConfig.JDBC_PROTOCOL, System.getProperty("database.protocol", | ||
MySqlConnectorConfig.JDBC_PROTOCOL.defaultValueAsString())) | ||
.with(MySqlConnectorConfig.JDBC_DRIVER, System.getProperty("database.jdbc.driver", | ||
MySqlConnectorConfig.JDBC_DRIVER.defaultValueAsString())) |
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.
Wouldn't it make it easier for users when they have a single switch that sets the backend to on of the supported MySQL types, like mysql, percona, mariadb, etc and we set related parameters accordingly instead of providing that full detail level?
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.
Yes, there is a Jira to introduce a strategy pattern for these use cases. But rather than shoehorn that into the code, we're doing this piecemeal so we see all the touch points we need to refactor more clearly over the 2.5 release cycle.
Configuration options like this definitely need to be dealt with but we also have to be a bit wary of how we change this so that its both backward compatible within the 2.x series and that we don't break some of the recent changes introduced to support drivers such as the AWS-specific driver so users can leverage the IAM authentication offered by AWS.
@@ -57,6 +57,10 @@ | |||
</exclusion> | |||
</exclusions> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.mariadb.jdbc</groupId> | |||
<artifactId>mariadb-java-client</artifactId> |
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 am not sure about this but maybe should drivers be provided
scope?!
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.
We've always shipped all open-source drivers with the connectors to simplify the installation for users. If a user needs or requires a specific driver, they're free to replace the driver as needed.
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.
Yes, both drivers hould be shipped, esp. if they can co-exist side-by-side.
Per https://jira.mariadb.org/browse/CONJ-977, the MariaDB team does not believe that the Integer.MIN_VALUE solution for triggering streaming is spec compliant and as of MariaDB 3.x+ drivers, they explicitly will not allow this. This change explicitly sets the fetchSize to 1 to mimic the same style of behavior that the default fetchSize uses when using MySQL. If a user provides a custom fetchSize, that will take precedences.
Speaking of co-existence @jpechane, see my recent commit about "fetchSize".
I'm going to start recording these nuances in that strategy Jira so we don't loose track. |
FYI, the link to download Mariadb connector plug-in is broken in v2.5 release page. |
Added debezium/debezium.github.io#969 to test a way to fix this. |
@jpechane so assuming that the tests pass now (I confirmed that the failures in the previous run at least passed locally now with my recent changes), this should be ready for a review. I added a note to the strategy Jira DBZ-7083 about the protocol changes in the connection configuration class so we can find a better solution in the later refactoring we intend to do. Through my discussions with the MariaDB guys, it seems that they suggested using |
So it looks like MySQL's handling of I'm almost inclined to say that the MySQL behavior may be what is wrong in these two tests, particularly with the fact that the outcome of the MariaDB test is this:
That 6 hour difference makes sense given the server is |
After an in-depth discussion with some folks with MariaDB, we've concluded that both drivers are working correctly but reacting to the default value information differently due to how the two drivers manage time zones. For MySQL, the MariaDB takes a completely different approach. In their case, their So it seems logical that we need to adjust the |
@Naros I don't think there is other solution. Let's just modify the test to account for it. |
Test failures are unrelated. |
@Naros Aplied, thanks a lot |
https://issues.redhat.com/browse/DBZ-7085