Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: DM同步在线DDL会阻塞后面的DML吗?
Dear all, I read the 1.0 documentation. The documentation after version 5.4 does not indicate that synchronous online DDL will block DML operations.
Is synchronous online DDL only blocking in versions 5.3 and earlier, such as 1.0 and 2.0? The explanation for version 5.4 does not mention the third line, so does that mean it won’t block after version 5.4?
Versions 5.3 and earlier would block. After 5.4, there is no write hint blocking.
Go check the PR that introduced this document change to see if you can find the PR that changed the DM code.
This issue should no longer exist in the new version.
You also need to pay attention to the version of TiDB. After version 7.5, the handling of DDL will be accelerated and will be much better.
Making an effort to try the new version.
In theory, it shouldn’t happen. But if there is lock contention, you still need to pay attention to the logs.
Well, the new version does have an optimization for DDL acceleration. But 7.5 is too new.
I did some testing. Regardless of whether there is blocking or not, create the index on the corresponding table in TiDB in advance. When DM performs online DDL synchronization, the final index creation will automatically prompt that it already exists and will be ignored. So it doesn’t really matter whether it affects or not. Just create it in advance. The old version before 5.3 would prompt that it might block, but the new version doesn’t prompt, so it won’t block.
Theoretically, operations on the same table will be blocked in the new version.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.