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://tidbcloud.com/free-trial
https://pingcap.com
Apache License 2.0
36.27k stars 5.72k forks source link

Pipelined DML do not abort after 24h #53011

Closed you06 closed 2 weeks ago

you06 commented 2 weeks ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Run a large pipelined DML last over 24 hours.

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

The transaction fail once 24 hours exceeded.

3. What did you see instead (Required)

The transaction runs until it start commiting PK, and finally failed by LockNotFound error.

[2024/04/25 14:59:32.375 +08:00] [WARN] [session.go:828] ["commit failed"] [conn=3040870406] [session_alias=] ["finished txn"="Txn{state=invalid}"] [error="[kv:8022]Error: KV error safe to retry Error(Txn(Error(Mvcc(Error(TxnLockNotFound { start_ts: TimeStamp(449298094747811842), commit_ts: TimeStamp(449322253637386243), key: [116, 128, 0, 0, 0, 0, 0, 4, 142, 95, 105, 128, 0, 0, 0, 0, 0, 0, 1, 3, 128, 0, 0, 0, 0, 31, 186, 195, 3, 128, 0, 0, 1, 49, 76, 50, 8] }))))) {tableID=1166, indexID=1, indexValues={2079427, 5122044424, }} [try againlater]"]

4. What is your TiDB version? (Required)

618cfbc1fcbf35a90c18bd0d9cebf1504fef4d8b