Skip to content

Commit 9e574f4

Browse files
committed
Removing default for consistent snapshot and adding lockless
1 parent c91b480 commit 9e574f4

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/azure-cli/azure/cli/command_modules/dms/_help.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@
324324
"make_source_server_read_only": "true|false",
325325
// Optional setting to enable consistent backup. True by default for the sync migration, and false otherwise.
326326
"enable_consistent_backup": "true|false",
327+
// Optional setting to enable lockless snapshot.
328+
"enable_consistent_backup_without_locks": "true|false",
327329
// Optional. If true, all view definitions will be migrated in the selected databases.
328330
"migrate_all_views": "true|false",
329331
// Optional. If true, all trigger definitions will be migrated in the selected databases.

src/azure-cli/azure/cli/command_modules/dms/scenario_inputs.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def get_migrate_mysql_to_azuredbformysql_sync_input(database_options_json,
7070
target_connection_info,
7171
has_schema_migration_options=True,
7272
has_consistent_snapshot_options=True,
73-
requires_consistent_snapshot=True,
7473
has_binlog_position=False)
7574

7675

@@ -82,7 +81,6 @@ def get_migrate_mysql_to_azuredbformysql_offline_input(database_options_json,
8281
target_connection_info,
8382
has_schema_migration_options=True,
8483
has_consistent_snapshot_options=True,
85-
requires_consistent_snapshot=False,
8684
has_binlog_position=False)
8785

8886

@@ -94,7 +92,6 @@ def get_migrate_mysql_to_azuredbformysql_cdc_input(database_options_json,
9492
target_connection_info,
9593
has_schema_migration_options=False,
9694
has_consistent_snapshot_options=False,
97-
requires_consistent_snapshot=False,
9895
has_binlog_position=True)
9996

10097

@@ -103,7 +100,6 @@ def get_migrate_mysql_to_azuredbformysql_input(database_options_json,
103100
target_connection_info,
104101
has_schema_migration_options: bool,
105102
has_consistent_snapshot_options: bool,
106-
requires_consistent_snapshot: bool,
107103
has_binlog_position: bool):
108104
database_options = []
109105
migration_level_settings = {}
@@ -140,12 +136,12 @@ def get_migrate_mysql_to_azuredbformysql_input(database_options_json,
140136
if not isinstance(migration_level_settings, dict):
141137
raise ValidationError('migration_level_settings should be a dictionary')
142138

143-
if requires_consistent_snapshot:
144-
migration_level_settings['enableConsistentBackup'] = 'true'
145-
elif has_consistent_snapshot_options:
139+
if has_consistent_snapshot_options:
146140
make_source_server_read_only = database_options_json.get('make_source_server_read_only', False)
147141
set_optional(migration_level_settings, 'enableConsistentBackup', database_options_json,
148142
'enable_consistent_backup')
143+
set_optional(migration_level_settings, 'enableConsistentBackupWithoutLocks', database_options_json,
144+
'enable_consistent_backup_without_locks')
149145

150146
if has_schema_migration_options:
151147
extract_schema_migration_options(migration_properties, database_options_json)

0 commit comments

Comments
 (0)