pingcap / pingcap/tidb

The tidb are always bootstrapped with `non-MDL` path

Open
#70,383 2 comments 1 reaction 1 assignee Claimed by @YangKeao View on GitHub
affects-7.1 affects-7.5 affects-8.1 affects-8.5 component/ddl severity/major type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

1. Run a lot of `CREATE / DROP` DDL which pushes the schema versions very fast.
2. Upgrade the TiDB.
3. The upgrade DDLs are blocked.

It's because the TiDB DDL starts without loading the system variables, so at the very beginning the `MDL` is always disabled. The new node will enter the `non-MDL` path and expect all nodes to report the latest schema version, while other nodes use the `MDL` path and report only the accurate version of the job.

If there is only one job (which is usually the case for upgrade, if there are no other DDLs), it will run normally. If there are other jobs modifying the schema, the upgrade will be blocked.

### 2. What did you expect to see? (Required)

1. The upgrade continues successfully.

### 3. What did you see instead (Required)

1. The upgrade is blocked forever.

It can be workaround by resign the DDL owner by calling the API.

### 4. What is your TiDB version? (Required)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.