Comments - Migrating from 'innodb' checksum to 'crc32' checksum

11 months, 1 week ago Keshan Nageswaran
This comment has the status of 'removed' and can only be seen by you.

Thank you for the detailed explanation.

The issue that I am facing right now. I am trying to upgrade MariaDB from 10.4.10 to 10.11.4. The checksum algorithm used in 10.4.10 is innodb. The checksum we are trying to use in 10.11.4 is full_crc32. We take physical backups in 10.4.10. The restore process includes innochecksum utility to compare checksums generated with stored checksums to identify any damages to data pages.

When I try to restore the backup taken in 10.4.10 with innodb checksum to MariaDB 10.11.4 with full_crc32 checksum. Checksum comparison fails for each innodb tables in my database at the first page complaining as following;

Fail: page::0 invalid
Exceeded the maximum allowed checksum mismatch count::1 current::0
Error: Page 0 checksum mismatch, can't continue.
}

As mentioned previously we use innochecksum utility to make this comparison. The initial understanding is that innochecksum utility has removed deprecated checksum algorithms from use (innnodb, none). Hence, it will not be supported. MDEV-25105

Then we decided to migrate the checksum algorithm to an algorithm(crc32) supported in innochecksum utility and MariaDB 10.4.10 (reason we did not pick full_crc32 is because it was not introduced) and take backups. Hence, we decided to migrate MariaDB 10.4.10 to crc32 first so the physical backups taken would be compatible with MariaDB 10.11.4 if we use crc32/full_crc32 algorithm.

My followup questions

  • Ideal scenario that I would like to achieve is to use 10.4.10 backups in 10.11.4 with the migrated checksum algorithm (innodb->full_crc32). How can I achieve it?
  • I had the same understanding as you mentioned that no change required. What could be the reason for the failure during checksum validation at first page? Is it because of flag introduced in first page of the data file for full_crc32 where the utility looks for it? Or the checksum utility does not support full_crc32? In that case, what is recommended? How we can check for integrity of data during restore?
 
11 months, 1 week ago Keshan Nageswaran

Scenario

If we are migrating from innodb -> crc32/full_crc32 checksum algorithm. Should we execute the checksum validation using innochecksum utility during restore of backup. Note: The backup contains innodb checksum stored and server has crc32 checksum configuration. As I remember, new checksum will only be used/picked up when blocks are modified.

  • Instead of waiting for blocks to be modified over time for the new checksum to be used, how can we rebuild the tables so all blocks gets updated?
  • Should we skip the checksum validation during restore?
 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.