diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-01-29 15:13:08 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-02-13 18:19:15 +0200 |
commit | 67c76704a8f7ef4f8e143f0285f9549ed50a857c (patch) | |
tree | f3340f3789bee256ed6d7226fff7f29aed64156a /extra | |
parent | f37a29dd6624db6a1baece54e7625a16137ec383 (diff) | |
download | mariadb-git-67c76704a8f7ef4f8e143f0285f9549ed50a857c.tar.gz |
MDEV-12353: Remove MLOG_INDEX_LOAD (innodb_log_optimize_ddl)
NOTE: This may break crash-upgrade from a dataset that was
created with innodb_log_optimize_ddl=ON. Also due to
ROW_FORMAT=COMPRESSED pages, it will be easiest to disallow
crash-upgrade.
It would be more robust to disable the MDEV-12699 logic when
crash-upgrading from old redo log format.
log_optimized_ddl_op: Remove.
fil_space_t::enable_lsn, file_name_t::enable_lsn: Remove.
ddl_tracker_t::optimized_ddl: Remove.
TODO: Remove ddl_tracker
Diffstat (limited to 'extra')
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 7a10e401fa7..03533896d0b 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -352,8 +352,6 @@ typedef std::map<space_id_t,std::string> space_id_to_name_t; struct ddl_tracker_t { /** Tablspaces with their ID and name, as they were copied to backup.*/ space_id_to_name_t tables_in_backup; - /** Tablespaces for that optimized DDL without redo log was found.*/ - std::set<space_id_t> optimized_ddl; /** Drop operations found in redo log. */ std::set<space_id_t> drops; /* For DDL operation found in redo log, */ @@ -665,30 +663,6 @@ static void backup_file_op_fail(ulint space_id, const byte* flags, } -/** Callback whenever MLOG_INDEX_LOAD happens. -@param[in] space_id space id to check */ -static void backup_optimized_ddl_op(ulint space_id) -{ - pthread_mutex_lock(&backup_mutex); - ddl_tracker.optimized_ddl.insert(space_id); - pthread_mutex_unlock(&backup_mutex); -} - -/* - Optimized DDL callback at the end of backup that - run with --no-lock. Usually aborts the backup. -*/ -static void backup_optimized_ddl_op_fail(ulint space_id) { - msg("DDL tracking : optimized DDL on space %zu", space_id); - if (ddl_tracker.tables_in_backup.find(space_id) != ddl_tracker.tables_in_backup.end()) { - ut_a(opt_no_lock); - msg("ERROR : Optimized DDL operation detected in the late phase of backup." - "Backup is inconsistent. Remove --no-lock option to fix."); - exit(EXIT_FAILURE); - } -} - - /* Retrieve default data directory, to be used with --copy-back. @@ -4223,7 +4197,6 @@ fail_before_log_copying_thread_start: /* copy log file by current position */ log_copy_scanned_lsn = checkpoint_lsn_start; recv_sys.recovered_lsn = log_copy_scanned_lsn; - log_optimized_ddl_op = backup_optimized_ddl_op; if (xtrabackup_copy_logfile()) goto fail_before_log_copying_thread_start; @@ -4368,7 +4341,6 @@ void backup_fix_ddl(void) /* Disable further DDL on backed up tables (only needed for --no-lock).*/ pthread_mutex_lock(&backup_mutex); log_file_op = backup_file_op_fail; - log_optimized_ddl_op = backup_optimized_ddl_op_fail; pthread_mutex_unlock(&backup_mutex); DBUG_MARIABACKUP_EVENT("backup_fix_ddl",0); @@ -4385,32 +4357,14 @@ void backup_fix_ddl(void) continue; } - bool has_optimized_ddl = - ddl_tracker.optimized_ddl.find(id) != ddl_tracker.optimized_ddl.end(); - if (ddl_tracker.id_to_name.find(id) == ddl_tracker.id_to_name.end()) { - if (has_optimized_ddl) { - new_tables.insert(name); - } continue; } /* tablespace was affected by DDL. */ const std::string new_name = ddl_tracker.id_to_name[id]; if (new_name != name) { - if (has_optimized_ddl) { - /* table was renamed, but we need a full copy - of it because of optimized DDL. We emulate a drop/create.*/ - dropped_tables.insert(name); - new_tables.insert(new_name); - } else { - /* Renamed, and no optimized DDL*/ - renamed_tables[name] = new_name; - } - } else if (has_optimized_ddl) { - /* Table was recreated, or optimized DDL ran. - In both cases we need a full copy in the backup.*/ - new_tables.insert(name); + renamed_tables[name] = new_name; } } |