Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: max-txn-time-use参数
To improve efficiency, please provide the following information. Clear problem descriptions can be resolved faster:
[TiDB Usage Environment] Production Environment 5.1
I saw the following sentence in the official documentation:
txn takes too much time. The transaction takes too long (more than 590s) without committing, and this error is reported when preparing to commit. You can bypass this issue by increasing the [tikv-client] max-txn-time-use = 590 parameter and increasing the GC life time (if there is indeed such a need). Generally, it is recommended to check whether the business really needs to execute such long transactions.
However, when looking for this parameter, I only saw the introduction of this parameter in version 3.0? I couldn’t find this parameter later, was it deprecated?
Increase the [tikv-client] max-txn-time-use = 590 parameter? Where can this be modified?
It should be set in the TiDB configuration file.
However, after checking the configuration file instructions starting from version 4.0 and the detailed configuration examples in the git repository, it is true that there is no mention of this configuration anymore.
Has it been replaced with:
max-txn-ttl
The maximum time a single transaction can hold a lock. If this time is exceeded, the lock of the transaction may be cleared by other transactions, causing the transaction to fail to commit successfully.
Default value: 3600000
Unit: milliseconds
Transactions exceeding this time can only execute commit or rollback, and commit may not necessarily succeed.
I am writing TiDB development specifications and came across this parameter, so I want to study it.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.