TiDB Unable to Modify table_open_cache_instances Configuration Parameter

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

Original topic: TIDB 无法修改table_open_cache_instances配置参数

| username: residentevil

[TiDB Usage Environment] Production Environment
[TiDB Version] v6.1.7
[Reproduction Path] Use the command tiup cluster edit-config xxx to add the table_open_cache_instances configuration. The default value of this parameter is 1, and it is hoped to adjust it to 16.
[Encountered Problem: Problem Phenomenon and Impact] After executing the command tiup cluster reload xx, the following error is reported: contained invalid configuration options: table_open_cache_instances. Is it possible that this parameter does not support modification?

| username: h5n1 | Original post link

Where did you see this parameter?

| username: residentevil | Original post link

The image is not visible. Please provide the text you need translated.

| username: 像风一样的男子 | Original post link

This is a MySQL system variable, TiDB does not have it.

| username: residentevil | Original post link

However, it can be shown, just cannot be modified.

| username: 像风一样的男子 | Original post link

These parameters in the TiDB source code comments exist for MySQL compatibility, and changing them is meaningless.
// The following sysVars are noops.
// Some applications will depend on certain variables to be present or settable,
// for example query_cache_time. These are included for MySQL compatibility,
// but changing them has no effect on behavior.


| username: Kongdom | Original post link

To modify the output, you need to execute the set statement. It cannot be changed in the configuration file. Note the difference between system variables and configuration parameters.

| username: residentevil | Original post link

It seems that some parameters native to MySQL indeed cannot be modified in TiDB.

| username: 大飞哥online | Original post link

To change the variables shown, you need to set them in the login.

| username: TiDB_C罗 | Original post link

So indeed, we need to modify the system parameters. How can we modify the system parameters by specifying the configuration file like in MySQL?

| username: Fly-bird | Original post link

How about trying to use set?

| username: h5n1 | Original post link

TiDB doesn’t have this kind of cache structure, and it’s only for syntax compatibility. Changing it won’t make any difference.

| username: ajin0514 | Original post link

Show the parameters.

| username: xfworld | Original post link

This parameter is only effective for MySQL. TiDB includes this parameter by default for compatibility with MySQL, but it does not have any actual effect.

For TiDB’s cache, you need to refer to TiDB’s system for configuration:


Reference for debugging and configuration process cases:

| username: ajin0514 | Original post link

Show it and let us take a look.