diff --git a/configuration/etl/etl.d/xdmod-migration-9_5_0-10_0_0.json b/configuration/etl/etl.d/xdmod-migration-9_5_0-10_0_0.json index d72adb45fc..f64b973b8d 100644 --- a/configuration/etl/etl.d/xdmod-migration-9_5_0-10_0_0.json +++ b/configuration/etl/etl.d/xdmod-migration-9_5_0-10_0_0.json @@ -76,6 +76,57 @@ "schema": "modw" } } + }, + { + "name": "update-schema-version-history-tables-to-innodb", + "description": "Update modw_cloud tables to InnoDB", + "class": "ManageTables", + "definition_file_list": [ + "common/hpcdb/schema-version-history.json" + ], + "endpoints": { + "destination": { + "type": "mysql", + "name": "XDMoD Data Warehouse", + "config": "datawarehouse", + "schema": "mod_hpcdb" + } + } + }, + { + "name": "update-shredder-tables-to-innodb", + "description": "Update modw_cloud tables to InnoDB", + "class": "ManageTables", + "definition_file_list": [ + "common/shredder/schema-version-history.json" + ], + "endpoints": { + "destination": { + "type": "mysql", + "name": "XDMoD Data Warehouse", + "config": "datawarehouse", + "schema": "mod_shredder" + } + } + }, + { + "name": "convert-mod-logger-tables-to-innodb", + "description": "Convert mod_logger tables to InnoDB", + "class": "ExecuteSql", + "sql_file_list": [ + { + "delimiter": ";", + "sql_file": "migrations/9.5.0-10.0.0/mod_logger/convert_to_innodb.sql" + } + ], + "endpoints": { + "destination": { + "type": "mysql", + "name": "XDMoD Data Warehouse", + "config": "datawarehouse", + "schema": "mod_logger" + } + } } ], "cloud-migration-9-5-0_10-0-0": [ diff --git a/configuration/etl/etl_sql.d/migrations/9.5.0-10.0.0/mod_logger/convert_to_innodb.sql b/configuration/etl/etl_sql.d/migrations/9.5.0-10.0.0/mod_logger/convert_to_innodb.sql new file mode 100644 index 0000000000..f5e4458d78 --- /dev/null +++ b/configuration/etl/etl_sql.d/migrations/9.5.0-10.0.0/mod_logger/convert_to_innodb.sql @@ -0,0 +1,7 @@ +-- These tables cannot be locked for writing while converting to InnoDB as it +-- will cause a deadlock and the migration process will time out. + +ALTER TABLE `mod_logger`.`log_id_seq` ENGINE=InnoDB; +ALTER TABLE `mod_logger`.`log_level` ENGINE=InnoDB; +ALTER TABLE `mod_logger`.`log_table` ENGINE=InnoDB; +ALTER TABLE `mod_logger`.`schema_version_history` ENGINE=InnoDB; diff --git a/configuration/etl/etl_tables.d/common/hpcdb/schema-version-history.json b/configuration/etl/etl_tables.d/common/hpcdb/schema-version-history.json index bc9572fa98..c496568a69 100644 --- a/configuration/etl/etl_tables.d/common/hpcdb/schema-version-history.json +++ b/configuration/etl/etl_tables.d/common/hpcdb/schema-version-history.json @@ -1,7 +1,7 @@ { "table_definition": { "name": "schema_version_history", - "engine": "MyISAM", + "engine": "InnoDB", "columns": [ { "name": "database_name", diff --git a/configuration/etl/etl_tables.d/common/shredder/schema-version-history.json b/configuration/etl/etl_tables.d/common/shredder/schema-version-history.json index bc9572fa98..c496568a69 100644 --- a/configuration/etl/etl_tables.d/common/shredder/schema-version-history.json +++ b/configuration/etl/etl_tables.d/common/shredder/schema-version-history.json @@ -1,7 +1,7 @@ { "table_definition": { "name": "schema_version_history", - "engine": "MyISAM", + "engine": "InnoDB", "columns": [ { "name": "database_name", diff --git a/db/schema/mod_logger.sql b/db/schema/mod_logger.sql index a33eefab0d..83a6db8ce2 100644 --- a/db/schema/mod_logger.sql +++ b/db/schema/mod_logger.sql @@ -15,7 +15,7 @@ DROP TABLE IF EXISTS `log_id_seq`; CREATE TABLE `log_id_seq` ( `sequence` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`sequence`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `log_level`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -25,7 +25,7 @@ CREATE TABLE `log_level` ( `level` varchar(16) NOT NULL, `description` varchar(64) DEFAULT NULL, PRIMARY KEY (`log_level_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `log_table`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -41,7 +41,7 @@ CREATE TABLE `log_table` ( KEY `priority_idx` (`priority`), KEY `logscan` (`ident`,`priority`,`id`), KEY `get_messages_idx` (`ident`,`logtime`,`priority`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `schema_version_history`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -53,7 +53,7 @@ CREATE TABLE `schema_version_history` ( `action_type` enum('created','upgraded') NOT NULL, `script_name` varchar(255) NOT NULL, PRIMARY KEY (`database_name`,`schema_version`,`action_datetime`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -64,4 +64,3 @@ CREATE TABLE `schema_version_history` ( /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -