failed to get schema version, "There is no Write MVCC info for the schema version"
- 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)
I use keyspace feature, (by setting keyspacename=xxx in the config file)
### 2. What did you expect to see? (Required)
No WARN log
### 3. What did you see instead (Required)
```
[2025/04/22 20:19:30.354 +08:00] [WARN] [domain.go:318] ["failed to get schema version"] [keyspaceName=ks1234] [error="There is no Write MVCC info for the schema version"] [version=63]
```
This WARN log indicates something wrong...
In domain package, we construct some MVCC key and get the mvcc data from tikv:
https://github.com/pingcap/tidb/blob/709bd1f95cd04823445531b77a629628d455f079/pkg/domain/domain.go#L449
I suspect this key does not consider the keyspace info, so the key is incorrect, and get no data.
### 4. What is your TiDB version? (Required)
master 7e32850b96fac9291818c5d942810b227e958c59
Contributor guide
Assessment
This issue has not been assessed yet.