Rebuilding a single corrupt table with dual master replication I have a replication setup with two MariaDB 10.2 instances set up in a dual-master configuration. On host A, a table has been corrupted somehow; whenever I try to read from it (including CHECK TABLE tablename) the process crashes.
May 05 13:04:05 hostA.my.internal mysqld[2666]: 2021-05-05 13:04:05 0x7f8b781c1700  InnoDB: Assertion failure in file /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.36/storage/innobase/btr/btr0cur.cc line 376
May 05 13:04:05 hostA.my.internal mysqld[2666]: InnoDB: Failing assertion: btr_page_get_next(get_block-&gt;frame) == page_get_page_no(page)

I'm planning to take host A offline, and use innochecksum to diagnose the problem.
If, as I suspect, I need to rebuild this table, what is the quickest and safest way to go about it? I know I could repopulate host A's entire database from a dump of host B and rebuild replication from scratch, but I am hoping to avoid the trouble if it's possible.
If I get a dump of the table from host B and try importing it on host A, then DROP TABLE and all those INSERT statements (about 1.6 million rows) will be replicated, causing a lot of traffic and interfering with live services accessing host B.
Tagging as MySQL as well, since this seems like it should be applicable to either.
Ensure host B is your active host in the dual master
Rest of instructions are on host A
As reading from A.tablename will probably crash it, try this with another tablename to be familiar with what its doing. pt-table-sync --dry-run --print --execute --sync-to-master h=hostB,D=db,t=sometablename
look closely at the above.
SET GLOBAL innodb_file_per_table=1 (if not already)
STOP SLAVE
To have a new table idb file: set session sql_log_bin=0; RENAME TABLE tablename TO tablename_orig
quick populate table from B without replicating: ( echo 'set session sql_log_bin=0;' ; mysqldump --single-transaction --host hostB db tablename ) | mysql --host A db
start slave
pt-table-sync --print --execute --sync-to-master h=hostB,D=db,t=tablename

Please read pt-table-sync carefully. Its been a few years since I've used this. Note the bits about it locking tables briefly on the master for small periods of time to read data in small chunks. This, and all the other interactions should be obvious on from the --dry-run --print.