pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
37.01k stars 5.82k forks source link

Hit 9004: Resolve lock time after inject time jump to pd leader #35005

Open mayjiang0203 opened 2 years ago

mayjiang0203 commented 2 years ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

1、Inject some time offset (+one year) to pd leader; 2、After serval minutes, set time back to normal; 3、Do query such as: SELECT * FROM information_schema.tables WHERE table_schema = '%s' AND table_name = '%s' LIMIT 1;`,

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

Every thing works fine.

3. What did you see instead (Required)

[2022/05/06 20:28:16.400 +00:00] [WARN] [backoff.go:152] ["txnLockFast backoffer.maxSleep 40000ms is exceeded, errors:\nlocked:<primary_lock:\"t\200\000\000\000\000\000\000\025i\200\000\000\000\000\000\000\002\003\200\000\000\000\000\000\005\" lock_version:434966627617672470 key:\"t\200\000\000\000\000\000\000\025i\200\000\000\000\000\000\000\002\003\200\000\000\000\000\000\005\" lock_ttl:20000 txn_size:4 lock_for_update_ts:434966627617672470 use_async_commit:true min_commit_ts:434966627617672483

lock version 434966627617672470 is 2022/7

4. What is your TiDB version? (Required)

master

mayjiang0203 commented 2 years ago

/assign @cfzjywxk