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

Access Vitess using the MySQL driver #1144

Merged
merged 1 commit into from Aug 13, 2019

Conversation

@tirsen
Copy link
Collaborator

commented Aug 12, 2019

Adds a new VITESS_MYSQL data source type which accesses Vitess using the
mysql protocol and the MySQL JDBC driver

@tirsen tirsen requested review from swankjesse, mmihic and kalfonso Aug 12, 2019

@tirsen tirsen force-pushed the jontirsen/2019-08-12/vitess-over-mysql branch from d0b5d11 to e91cb34 Aug 12, 2019

@mightyguava

This comment has been minimized.

Copy link
Collaborator

commented Aug 12, 2019

Oh is this a new Vitess feature? How well has it been tested?

type: VITESS
username: vt_app
password: whatever
vitess_schema_resource_root: classpath:/misk/hibernate/moviestestmodule-schema
vitess_mysql_data_source:
type: VITESS_MYSQL

This comment has been minimized.

Copy link
@mightyguava

mightyguava Aug 12, 2019

Collaborator

our configs are auto-provisioned, how were you envisioning this to work? Generate another copy of each db for VITESS_MYSQL?

This comment has been minimized.

Copy link
@tirsen

tirsen Aug 12, 2019

Author Collaborator

Yeah it will be a gradual roll out. I imagine we add an option to the hcl which makes it generate VITESS_MYSQL config instead of VITESS and then we roll it one app the at the time and then eventually make it the default. It should be completely transparent to the app. You shouldn't even need to recompile (except to include this version of misk of course).

But first of all I want to make some scale/perf testing on this using Arnhem. It's still somewhat experimental at this stage I should say.

@tirsen

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 12, 2019

@mightyguava Nope it's not new at all. It's been around for years. They actually initially built it because we (Square) asked for it. Ironically we never ended up using it but pretty much everyone else is using it. For example Slack uses the mysql protocol for all their production traffic. (It's the best way to connect to Vitess via PHP.)

Access Vitess using the MySQL driver
Adds a new VITESS_MYSQL data source type which accesses Vitess using the
mysql protocol and the MySQL JDBC driver

@tirsen tirsen force-pushed the jontirsen/2019-08-12/vitess-over-mysql branch from e91cb34 to 2993743 Aug 13, 2019

@tirsen tirsen merged commit 4034251 into master Aug 13, 2019

2 checks passed

ci/circleci: java Your tests passed on CircleCI!
Details
ci/circleci: node Your tests passed on CircleCI!
Details

@tirsen tirsen deleted the jontirsen/2019-08-12/vitess-over-mysql branch Aug 13, 2019

@swankjesse
Copy link
Collaborator

left a comment

LGTM

DataSourceType.VITESS -> config.vitess_data_source
DataSourceType.VITESS_MYSQL -> config.vitess_mysql_data_source
DataSourceType.MYSQL -> config.mysql_data_source
DataSourceType.HSQLDB -> throw RuntimeException("Not supported (yet?)")

This comment has been minimized.

Copy link
@swankjesse

swankjesse Aug 13, 2019

Collaborator

We should remove it

This comment has been minimized.

Copy link
@tirsen

tirsen Aug 13, 2019

Author Collaborator

yeah probably

}
}
}
}
}
}

@MiskTest(startService = true)
class MySQLTimestampListenerTest : TimestampListenerTest() {

This comment has been minimized.

This comment has been minimized.

Copy link
@tirsen

tirsen Aug 13, 2019

Author Collaborator

oh right I keep forgetting :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.