Recently my DWH Analytics have stopped updating. I’ve found a couple of things from the FAQ that look like they would apply, but running through the fixes has not solved my problem. What I’ve found so far:
Errors in etl_perform_retention_policy:
> Move old partitions to archive - An error occurred executing this job entry :
> Couldn't execute SQL: CALL move_innodb_to_archive()
>Too many partitions (including subpartitions) were defined
Everything else looks clean in the log files. Checking the locks in the database I find that retention_lock is set at 1, so I updated the table to set it back to 0, and called kalturadw.add_partitions();
After that was finished, I ran the manual update script for the DWH, and end up with the same error in the DWH logs and retention_lock gets stuck at 1 again. Any ideas?
Thanks for the article, I actually have already tried running that SP though. I am still getting the same errors on the DWH logs. Is there anyway I can verify that the SP is running properly?
After looking into the error too many partitions (including subpartitions) were defined
It seems that it is more of a database issue. So I took a look in the database information_schema , and did a quick select from the table PARTITIONS. I noticed that any table that was marked as *_archive had approximately 1024 different partitions.
With my google-fu I was able to dig up some old posts about the maximum amount of partitions for MariaDB and MySQL. It seems at one point it was 1024, although it looks like it was increased to 8192 later on for MySQL (V 5.6.7 from what I’ve read).
I’m running MariaDB 5.5. Assuming that this is the cause, is there anyway to safely remove some of these partitions, or is it recommended to upgrade to MariaDB 10.1 ?