You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2021/02/18 14:29:30.746 +08:00] [WARN] [2pc.go:1505] ["schemaLeaseChecker is not set for this transaction"] [conn=675] [sessionID=675] [startTS=423003362622177286] [commitTS=423003362622439424]
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered:
After the #22371 change, for innner transactions using RunInNewTxn function calls, the context from upper scope will be inherited and reused. The connection id will not be zero initializing the two phase committers, and the warn log is printted as the schema lease checker is not set yet.
Maybe we should keep it consistent for the RunInNewTxn interface and ExecRestrictedSQL, the storing of connection id need some refactor.
Besides, we need to more clearly define the unexpected path fetching the schema lease checker during commit, return error and prevent such transactions from committing successfully.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
create table t(a bigint PRIMARY KEY auto_random);
cat 1.sql
INSERT INTO
t
VALUES ();mysqlslap --query=1.sql -uroot -h127.0.0.1 -P4000 -c 100 --number-of-queries=10000000 --create-schema=test --commit=1
2. What did you expect to see? (Required)
No warning in tidb log.
3. What did you see instead (Required)
[2021/02/18 14:29:30.746 +08:00] [WARN] [2pc.go:1505] ["schemaLeaseChecker is not set for this transaction"] [conn=675] [sessionID=675] [startTS=423003362622177286] [commitTS=423003362622439424]
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: