anhnongdan / bimax_ha_migration

all db backup, recovery and migration scenarios for bimax
0 stars 0 forks source link

PW5 can't rotate tracker table after being restored from backup #12

Closed anhnongdan closed 6 years ago

anhnongdan commented 7 years ago

PW5 can't create tmp table, tracker table get stuck and all pageviews, BW count is 0.

InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
170901  7:20:04 [ERROR] InnoDB: Cannot create file './pw5/piwik_log_link_visit_action_tracker_tmp0_.ibd'

170901  7:20:04 [ERROR] InnoDB: The file './pw5/piwik_log_link_visit_action_tracker_tmp0_.ibd' already exists though the corresponding table did not exist in the InnoDB data dictionary. Have you moved InnoDB .ibd files around without using the SQL commands DISCARD TABLESPACE and IMPORT TABLESPACE, or did mysqld crash in the middle of CREATE TABLE? You can resolve the problem by removing the file './pw5/piwik_log_link_visit_action_tracker_tmp0_.ibd' under the 'datadir' of MySQL.
anhnongdan commented 7 years ago

Delete ./pw5/piwik_log_link_visit_action_trackertmp0.ibd manually, tracker table is rotated correctly:

MariaDB [pw5]> select min(server_time) from piwik_log_link_visit_action_tracker;
+---------------------+
| min(server_time)    |
+---------------------+
| 2017-09-01 08:09:50 |
+---------------------+
1 row in set (0.05 sec)
anhnongdan commented 6 years ago

Accept work around. like #14