Repository navigation
Description
Is there an existing issue for the same bug?
- Searched open and closed issues. This reports a pre-restore availability/performance incident, not a known root cause or a data-integrity failure.
Branch Name
4.2-dev
Commit ID
78fe31d619bd88b0e7638d6178fa904125b23533
Other Environment Information
Two separate TKE CI environments; TPC-C 1000 warehouses / 1000 terminals starting up; JDBC socketTimeout=60000. Times below are UTC. The detailed lock chains are from Snapshot; PITR is a second client symptom, not a second verified holder chain.
Actual Behavior
The pre-restore workloads reported 11 and 6 transaction errors, respectively. In Snapshot, two failed business sessions can be traced to district-row waiters at the lock owner. Both holders were live and executing, not abandoned idle transactions.
| Snapshot, Nov 27 UTC | Waiter / JDBC connection | Holder / connection | Lock owner observation |
|---|---|---|---|
| 23:47:52.471161 | txn ending 310f1f66 / 10550, PAYMENT district UPDATE |
txn ending ccb9feca / 10300 |
exclusive row, table 274149, waited 60.332 s |
| 23:47:56.642945 | txn ending 725fda2a / 11416, NEW_ORDER district SELECT FOR UPDATE |
txn ending 310f1f39 / 10279 |
different key, same table, waited 64.108 s |
The first holder was itself named in a failed active-txn probe at 23:46:52.968688. Its origin CN subsequently logged different statements in the same transaction taking 25.58 s, 20.88 s and 16.39 s. The second holder also completed successive statement executions of 27.21 s, 19.26 s and 16.58 s. The waiting clients reported communications failures and the corresponding server SQL was canceled. Do not attribute all 17 failures to these two locks. The benchmark's prebuilt JAR also mislabels other transaction types as TT_NEW_ORDER (related: matrixorigin/mo-tpcc#5).
In the sampled Snapshot window 23:46:20-23:48:10 the three TP CNs' container working sets were 31-40% of limits; the one-minute CPU rate did not approach the 14-core quotas. These are sampled container metrics, not proof against every runtime/IO stall.
Expected Behavior
With this supported workload, startup should not routinely cause transactions to wait behind slow but active holders beyond the configured client deadline. Distinguish expected row serialization from abnormally slow work being done while holding the rows. Do not shorten lock retention, fence a live txn or increase the socket timeout merely to make the benchmark green.
Steps to Reproduce
Use the linked 4.2 pre-restore 1000W/1000T phase and unchanged transaction mix/socket timeout. This is observational, not deterministic. In the Snapshot run search the lock owner for wait too long around 23:47:52-23:47:57 UTC. Use the holder txn IDs f025141386d9a46418ec0417ccb9feca and c5214fd19f0772ca18ec0418310f1f39 to join back to the source CN's time of Exec.Run, not just to the waiter errors. Compare the holders' statement/plan and wait profiles with a healthy startup before identifying a regression.
Additional information
- The lock service uses a separate active-txn client. A failed liveness probe retains the holder. It is not a business Lock RPC returning SQL 20502.
- [Bug] TPCC 1000w/1000t: lockservice 'failed to lock on remote: backend connection closed' during startup #26475 was a direct startup lock RPC failure with a critical-memory retry cutoff; [Bug]: Restore and clone follow-up TPCC loses multiple backend connections in synchronized bursts #28080 focuses on post-restore/clone failures; [Bug] TPCC warehouse=1000 Go GC 长暂停(500-900ms)导致 Lock wait timeout(4.2-dev / main 均偶现) #26182 attributed earlier samples to GC pauses. None establishes the upstream cause here. No evidence of a lost lock, wrong results or restore corruption.
- Still missing: why the live holders' individual statements took tens of seconds and whether this is version-dependent. An improvement should reduce holder statement times and remove the associated client failures under matched load, without changing transaction isolation.
Activity
fileservice: avoid whole-object fills on cold TP locking reads (#33615)