valerii, if I remember correctly, this was your idea.
The problem that was being solved at that time seemed to be a combination of two bugs:
- MariaDB Server (and mariabackup --prepare) would wrongly skip decryption if the before-encryption checksum happened to be the same as the after-encryption checksum.
- The checksum validation accepted very many variants of checksum algorithms, even when using innodb_checksum_algorithm=strict_crc32.
Now that these issues have been fixed in MDEV-12112, MDEV-17957, MDEV-17958, MDEV-18025, there should be less need for revisiting the re-reading logic.
thiru , I do not think this is a good idea generally. Could you explain why do you think it is a good idea?Does any OS kernel , or filesystem, guarantee you that a write operation is finished between 2 successive reads of the same data. Generally, why do we need anything apart from comparing checksums, which is already there? Can you give an example of partial page write, which produces the same crc32 that a full page write would produce? What are the odds that partial page write (some of 512 byte segments) and full page write of the pages of sizes 4-32K will produce the same crc32?