Will DM synchronization online DDL block subsequent DML?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: DM同步在线DDL会阻塞后面的DML吗?

| username: 舞动梦灵

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?

| username: 舞动梦灵 | Original post link

Versions 5.3 and earlier would block. After 5.4, there is no write hint blocking.

| username: 小龙虾爱大龙虾 | Original post link

Go check the PR that introduced this document change to see if you can find the PR that changed the DM code.

| username: dba远航 | Original post link

This issue should no longer exist in the new version.

| username: wangccsy | Original post link

Maybe it will.

| username: xfworld | Original post link

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.

| username: 这里介绍不了我 | Original post link

Making an effort to try the new version.

| username: zhaokede | Original post link

In theory, it shouldn’t happen. But if there is lock contention, you still need to pay attention to the logs.

| username: 舞动梦灵 | Original post link

Well, the new version does have an optimization for DDL acceleration. But 7.5 is too new.

| username: 哈喽沃德 | Original post link

Upgrade it.

| username: 舞动梦灵 | Original post link

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.

| username: kkpeter | Original post link

Theoretically, operations on the same table will be blocked in the new version.

| username: YuchongXU | Original post link

It won’t.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.