domain: lock error is not handled getting commit ts of schema diff key #48281
Labels
affects-6.5
affects-7.1
affects-7.5
severity/major
sig/sql-infra
SIG: SQL Infra
sig/transaction
SIG:Transaction
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Running stale read with concurrent DDL statements.
The cause of this issue is that the
mvccGetResp
may containWrite
information orLock
information when there's a perwrite lock on the key. In this situation, it's needed to resolve the lock to get the actualcommit_ts
of the schema version. Currently, it's not handled so even though the internal transaction has been committed the mvcc get may return nothing reading the schema diff key.2. What did you expect to see? (Required)
The stale read should use schema versions from schema cache.
3. What did you see instead (Required)
Sometimes the schema cache would be invalidated because of
mvcc get
error when getting commit ts of schema version.Related debug logs
4. What is your TiDB version? (Required)
v6.5.4
The text was updated successfully, but these errors were encountered: