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
If it is determined that the schema is out of date, there is no need to repeat the check schema version for each transaction.
\"[domain:8027]Information schema is out of date: schema failed to update in 1 lease, please make sure TiDB can connect to TiKV\
github.com/tikv/client-go/v2/txnkv/transaction.(*twoPhaseCommitter).checkSchemaValid\
\\t/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20230918062126-32c4ef54d6ed/txnkv/transaction/2pc.go:1922\
github.com/tikv/client-go/v2/txnkv/transaction.(*twoPhaseCommitter).execute\
\\t/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20230918062126-32c4ef54d6ed/txnkv/transaction/2pc.go:1586\
github.com/tikv/client-go/v2/txnkv/transaction.(*KVTxn).Commit\
\\t/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20230918062126-32c4ef54d6ed/txnkv/transaction/txn.go:502\
github.com/pingcap/tidb/store/driver/txn.(*tikvTxn).Commit\
\\t/tidb/store/driver/txn/txn_driver.go:87\
github.com/pingcap/tidb/session.(*LazyTxn).Commit\
\\t/tidb/session/txn.go:408\
github.com/pingcap/tidb/session.(*session).commitTxnWithTemporaryData\
\\t/tidb/session/session.go:856\
github.com/pingcap/tidb/session.(*session).doCommit\
\\t/tidb/session/session.go:742\
github.com/pingcap/tidb/session.(*session).doCommitWithRetry\
\\t/tidb/session/session.go:988\
github.com/pingcap/tidb/session.(*session).CommitTxn\
\\t/tidb/session/session.go:1118\
...
It will always take 5s get ErrInfoSchemaExpired error.
// CheckBySchemaVer checks if the schema version valid or not at txnTS.func (s*SchemaChecker) CheckBySchemaVer(txnTSuint64, startSchemaVer tikv.SchemaVer) (*transaction.RelatedSchemaChange, error) {
schemaOutOfDateRetryInterval:=SchemaOutOfDateRetryInterval.Load()
schemaOutOfDateRetryTimes:=int(SchemaOutOfDateRetryTimes.Load())
fori:=0; i<schemaOutOfDateRetryTimes; i++ {
relatedChange, CheckResult:=s.SchemaValidator.Check(txnTS, startSchemaVer.SchemaMetaVersion(), s.relatedTableIDs, s.needCheckSchema)
switchCheckResult {
caseResultSucc:
returnnil, nilcaseResultFail:
metrics.SchemaLeaseErrorCounter.WithLabelValues("changed").Inc()
returnrelatedChange, ErrInfoSchemaChangedcaseResultUnknown:
time.Sleep(schemaOutOfDateRetryInterval)
}
}
metrics.SchemaLeaseErrorCounter.WithLabelValues("outdated").Inc()
returnnil, ErrInfoSchemaExpired
}
The text was updated successfully, but these errors were encountered:
Enhancement
If it is determined that the schema is out of date, there is no need to repeat the check schema version for each transaction.
It will always take 5s get
ErrInfoSchemaExpired
error.The text was updated successfully, but these errors were encountered: