How to Hardcode the innodb_lock_wait_timeout Parameter in the Configuration File?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: innodb_lock_wait_timeout参数如何写死在配置文件里?

| username: Hacker_7b2KWuuo

wait-for-lock-timeout

  • The maximum time a pessimistic transaction waits for other transactions to release locks in TiKV. If it times out, an error will be returned to TiDB, and TiDB will retry locking. The maximum wait time for a statement to acquire a lock is controlled by innodb_lock_wait_timeout.
  • Default value: 1s
  • Minimum value: 1ms

How can I set the innodb_lock_wait_timeout parameter permanently in the configuration file?

Currently, I see in the documentation that it can only be set using set global innodb_lock_wait_timeout.

| username: Miracle | Original post link

After this change, it will be persistent, and the modified value will remain even after a restart.

| username: tidb菜鸟一只 | Original post link

This is a system parameter, not a configuration file parameter. Modifying the global system parameter will persist by default and will take effect even after a restart.

| username: Hacker_7b2KWuuo | Original post link

Thank you very much.

| username: Hacker_7b2KWuuo | Original post link

Thank you very much :slight_smile:

| username: TiDBer_5cwU0ltE | Original post link

This parameter is really special; it still takes effect after a restart. It needs to be implemented. Which configuration file does it go into? Does anyone know?

| username: DBAER | Original post link

Default persistence

| username: zhanggame1 | Original post link

The parameters should be placed inside the TiKV data.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.