[Question] DDL Operations Are Not Blocked Under the Pessimistic Transaction Model

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

Original topic: 【疑惑】在悲观事务模型下,DDL操作不被阻塞

| username: MrDuin

Testing version TiDB v6.1.0
In pessimistic lock mode, RC isolation level

terminal 1

create table t1(id int);
insert into t1 values(1);
commit;

start transaction;
select * from t1 for update;

terminal 2

alter table t1 add column name varchar(50); -- Can be executed successfully

There is some confusion here. When executing Online DDL, it does not check the lock CF. Does this mean that in TiDB’s implementation, there is no concept of metadata lock?

| username: 数据小黑 | Original post link

Here are some introductions to online DDL. I don’t know if it will help you.

| username: MrDuin | Original post link

Thank you very much for the article provided, I am currently reading it.

| username: system | Original post link

This topic will be automatically closed 60 days after the last reply. No new replies are allowed.