You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to make the connection reusable across multiple databases (#10), we need to:
Detect the "real" name of all databases the task is working with.
Make the real name available to all components that use it right now.
The most natural place for that seems to be the SqlServerTaskPartition and its Provider being introduced as part of #15.
Acceptance criteria:
Add a dependency on SqlServerConnection to SqlServerPartitionTask.Provider.
While initializing each task partition, execute a query like:
SELECT name FROMsys.databasesWHERE name = ?;
It will return the database name in its actual case (e.g. mAsTeR → master).
If the query above doesn't return one and only one row, JDBC will throw an exception which the code should catch and log as a warning. No reason to fail the task.
Initialize each SqlServerTaskPartition with a real database name instead of the configured one.
Remove the current logic from the connection class.
The text was updated successfully, but these errors were encountered:
morozov
changed the title
Move conversion of dbname to realDatabaseName out of SqlServerConnection
Move realDatabaseName out of the SqlServerConnection state
Mar 9, 2021
Currently, the "real" name of the source database is detected right after connecting to the database at the connection level:
debezium/debezium-connector-sqlserver/src/main/java/io/debezium/connector/sqlserver/SqlServerConnection.java
Lines 116 to 120 in e1cf58f
In order to make the connection reusable across multiple databases (#10), we need to:
The most natural place for that seems to be the
SqlServerTaskPartition
and itsProvider
being introduced as part of #15.Acceptance criteria:
SqlServerConnection
toSqlServerPartitionTask.Provider
.mAsTeR
→master
).SqlServerTaskPartition
with a real database name instead of the configured one.The text was updated successfully, but these errors were encountered: