-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
#1233 discusses a change of URL splitting delimiter from , to ; to allow connections to multiple shards. A comment from @busbey mentions that semicolons aren't present in JDBC URLs. That is not correct for MSSQL JDBC driver, which uses semicolons to delimit connection string properties. Doc reference: https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url.
Thus, it is no longer possible to specify any connection properties in the URL, including a SQL Server database name to connect to. Only connections to the master database are possible, but master is a system database that should not be used for any user workload. This also makes it impossible to use YCSB against Azure SQL where specifying database name in the connection URL is mandatory.
Proposal: add support for quoting the db.url property. If quoted, any semicolon within the URL string will be treated as part of the string, not as a shard delimiter. Example of proposed syntax for two shards:
db.url="jdbc:sqlserver://server-name.database.windows.net:1433;databaseName=ycsb1";"jdbc:sqlserver://server-name.database.windows.net:1433;databaseName=ycsb2"
Currently, when URL is
db.url=jdbc:sqlserver://server-name.database.windows.net:1433;databaseName=ycsb
connection fails as follows:
YCSB Client 0.17.0
Loading workload...
Starting test.
Adding shard node URL: jdbc:sqlserver://server-name.database.windows.net:1433
Adding shard node URL: databaseName=ycsb
Error in database operation: java.sql.SQLException: No suitable driver found for databaseName=ycsb
site.ycsb.DBException: java.sql.SQLException: No suitable driver found for databaseName=ycsb