7.4 Setting the engine for one TiDB server will affect all TiDB servers; individual instances cannot be configured separately

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

Original topic: 7.4 设置某个tidbserver的引擎后所有tidbserver都会生效,不能单独设置某个实例的

| username: Running

SET tidb_isolation_read_engines=‘tidb,tiflash’,
using the configuration file is the same.

| username: Kongdom | Original post link

:thinking: Do you want to set it to take effect individually, or not set it to take effect individually?

This is at the session level, so it should only affect the current session.

| username: Running | Original post link

I want it to only take effect on a specific tidbserver.

| username: 大飞哥online | Original post link

This won’t work. Either it takes effect at the current session level or for all sessions. There’s no way for it to take effect on one TiDB server and not on another.

| username: Jellybean | Original post link

You can achieve your goal by modifying the configuration file of a single instance node and then restarting that node.

| username: Running | Original post link

Indeed, this is how it operates. It works on version 7.0, but not on version 7.4.

| username: Jellybean | Original post link

If it really isn’t supported, check the official website for any special instructions. If there aren’t any, you can file a bug report.

| username: Fly-bird | Original post link

There is a difference between session and global.

| username: Kongdom | Original post link

You must be referring to this configuration file, right? It definitely supports taking effect on a single node. After modifying the configuration file, you can add the -N option to specify a particular TiDB node when reloading to make it effective.

| username: h5n1 | Original post link

I tried it and indeed there is an issue:

The config file is configured as follows:
image

Variable values for node 16:
image

Variable values for node 17, although the config file specifies tikv, the variable value takes effect:

Set set global tidb_isolation_read_engines='tiflash'; on node 16, and check after re-logging into the two nodes:
image

From the above, the following issues are evident:

  1. The official documentation states that this variable is session-level only, but it can actually be set globally using set global, and the documentation has not been updated.

sysvar: Add global level for variable tidb_enforce_mpp and tidb_isolation_read_engines. #27777

image

  1. From the functionality of this parameter, even after introducing the set global feature, this parameter should be instance-level, which suggests there might be a bug.

  2. The config parameter setting did not affect the variable value.

Feedback has been provided, waiting for an official response.

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

Everyone is testing the development version.

| username: Billmay表妹 | Original post link

Got it, I’ll get back to the product and research team on Monday.

| username: Kongdom | Original post link

:+1: :+1: :+1: Rigorous~

| username: Billmay表妹 | Original post link

set `isolation-read` for each tidb instance can't work · Issue #48177 · pingcap/tidb · GitHub has been submitted.

| username: Kongdom | Original post link

:+1: :+1: :+1:

| username: andone | Original post link

https://docs.pingcap.com/en/

| username: system | Original post link

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