From 9e574f44361a4ee633ed10e7129e588fd5b2ece3 Mon Sep 17 00:00:00 2001 From: temandr Date: Fri, 9 May 2025 17:39:00 +0000 Subject: [PATCH 1/2] Removing default for consistent snapshot and adding lockless --- src/azure-cli/azure/cli/command_modules/dms/_help.py | 2 ++ .../azure/cli/command_modules/dms/scenario_inputs.py | 10 +++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/dms/_help.py b/src/azure-cli/azure/cli/command_modules/dms/_help.py index ab38912e738..18e54cda308 100644 --- a/src/azure-cli/azure/cli/command_modules/dms/_help.py +++ b/src/azure-cli/azure/cli/command_modules/dms/_help.py @@ -324,6 +324,8 @@ "make_source_server_read_only": "true|false", // Optional setting to enable consistent backup. True by default for the sync migration, and false otherwise. "enable_consistent_backup": "true|false", + // Optional setting to enable lockless snapshot. + "enable_consistent_backup_without_locks": "true|false", // Optional. If true, all view definitions will be migrated in the selected databases. "migrate_all_views": "true|false", // Optional. If true, all trigger definitions will be migrated in the selected databases. diff --git a/src/azure-cli/azure/cli/command_modules/dms/scenario_inputs.py b/src/azure-cli/azure/cli/command_modules/dms/scenario_inputs.py index 624f3bac2ee..9c094f38a00 100644 --- a/src/azure-cli/azure/cli/command_modules/dms/scenario_inputs.py +++ b/src/azure-cli/azure/cli/command_modules/dms/scenario_inputs.py @@ -70,7 +70,6 @@ def get_migrate_mysql_to_azuredbformysql_sync_input(database_options_json, target_connection_info, has_schema_migration_options=True, has_consistent_snapshot_options=True, - requires_consistent_snapshot=True, has_binlog_position=False) @@ -82,7 +81,6 @@ def get_migrate_mysql_to_azuredbformysql_offline_input(database_options_json, target_connection_info, has_schema_migration_options=True, has_consistent_snapshot_options=True, - requires_consistent_snapshot=False, has_binlog_position=False) @@ -94,7 +92,6 @@ def get_migrate_mysql_to_azuredbformysql_cdc_input(database_options_json, target_connection_info, has_schema_migration_options=False, has_consistent_snapshot_options=False, - requires_consistent_snapshot=False, has_binlog_position=True) @@ -103,7 +100,6 @@ def get_migrate_mysql_to_azuredbformysql_input(database_options_json, target_connection_info, has_schema_migration_options: bool, has_consistent_snapshot_options: bool, - requires_consistent_snapshot: bool, has_binlog_position: bool): database_options = [] migration_level_settings = {} @@ -140,12 +136,12 @@ def get_migrate_mysql_to_azuredbformysql_input(database_options_json, if not isinstance(migration_level_settings, dict): raise ValidationError('migration_level_settings should be a dictionary') - if requires_consistent_snapshot: - migration_level_settings['enableConsistentBackup'] = 'true' - elif has_consistent_snapshot_options: + if has_consistent_snapshot_options: make_source_server_read_only = database_options_json.get('make_source_server_read_only', False) set_optional(migration_level_settings, 'enableConsistentBackup', database_options_json, 'enable_consistent_backup') + set_optional(migration_level_settings, 'enableConsistentBackupWithoutLocks', database_options_json, + 'enable_consistent_backup_without_locks') if has_schema_migration_options: extract_schema_migration_options(migration_properties, database_options_json) From fbff9beb285e6e32143956640026d1757b789406 Mon Sep 17 00:00:00 2001 From: temandr Date: Fri, 9 May 2025 18:43:39 +0000 Subject: [PATCH 2/2] Updating comment to reflect that consistent snapshot is not enabled when lockless is enabled instead --- src/azure-cli/azure/cli/command_modules/dms/_help.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/dms/_help.py b/src/azure-cli/azure/cli/command_modules/dms/_help.py index 18e54cda308..8043e5f5c1d 100644 --- a/src/azure-cli/azure/cli/command_modules/dms/_help.py +++ b/src/azure-cli/azure/cli/command_modules/dms/_help.py @@ -322,7 +322,7 @@ }, // Optional setting to set the source server read only. "make_source_server_read_only": "true|false", - // Optional setting to enable consistent backup. True by default for the sync migration, and false otherwise. + // Optional setting to enable consistent backup. True by default for the sync migration, unless lockless is enabled. "enable_consistent_backup": "true|false", // Optional setting to enable lockless snapshot. "enable_consistent_backup_without_locks": "true|false",