As per https://github.com/microsoft/durabletask-mssql/issues/48, this change allows the worker to create the database automatically if it doesn't exist. Because the worker must gracefully handle the possibility the DB hasn't been created, a few changes needed to be made:
The initial connection to the SQL server must use another Initial Catalog or Database instead of the user-specified one. As such, the worker now initially connects to the system database master
The lock for upgrading the schema was also previously obtained within the context of the user-specified Database, so now the lock is only obtained after the presence of the database has been verified.
Each worker now independently checks the existence of the database.
New log events have been created for executing arbitrary SQL commands/statements and creating a database
New log assertion APIs have been added to accommodate non-deterministic scenarios, such as the initial inspection of whether the database exists
As per https://github.com/microsoft/durabletask-mssql/issues/48, this change allows the worker to create the database automatically if it doesn't exist. Because the worker must gracefully handle the possibility the DB hasn't been created, a few changes needed to be made:
Initial Catalog
orDatabase
instead of the user-specified one. As such, the worker now initially connects to the system databasemaster
Database
, so now the lock is only obtained after the presence of the database has been verified.