Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System Variables page states that tidb_external_ts is GLOBAL while other pages state it can also be SESSION level #20611

Open
benmeadowcroft opened this issue Mar 20, 2025 · 3 comments · May be fixed by #20667
Assignees

Comments

@benmeadowcroft
Copy link
Collaborator

Error Report

  1. What is the URL/path of the document related to this issue?

https://docs.pingcap.com/tidb/stable/system-variables/#tidb_external_ts-new-in-v640

  1. How would you like to improve it?

Currently the page states that

tidb_external_ts New in v6.4.0
Scope: GLOBAL

However elsewhere in the documentation it states that it can be set either globally or at the session level.

I would like this ambiguity to be resolved by either updating the system variables page to note that SESSION scope is also supported, or update the other pages to correct the misinformation.

The page that indicate this can be SESSION scoped states:

Besides, TiDB provides a way to specify an exact point in time by setting the tidb_external_ts system variable on session or global level.

@Oreoxmt
Copy link
Collaborator

Oreoxmt commented Mar 21, 2025

@YangKeao Could you please help confirm the scope of the tidb_external_ts variable?

I've tested it on v8.5.1, and it appears to be GLOBAL:

mysql> SELECT VARIABLE_NAME, VARIABLE_SCOPE FROM INFORMATION_SCHEMA.VARIABLES_INFO WHERE VARIABLE_NAME = 'tidb_external_ts';
+------------------+----------------+
| VARIABLE_NAME    | VARIABLE_SCOPE |
+------------------+----------------+
| tidb_external_ts | GLOBAL         |
+------------------+----------------+
1 row in set (0.01 sec)

Related PR: pingcap/tidb#38276

@YangKeao
Copy link
Member

YangKeao commented Mar 27, 2025

@YangKeao Could you please help confirm the scope of the tidb_external_ts variable?

I've tested it on v8.5.1, and it appears to be GLOBAL:

mysql> SELECT VARIABLE_NAME, VARIABLE_SCOPE FROM INFORMATION_SCHEMA.VARIABLES_INFO WHERE VARIABLE_NAME = 'tidb_external_ts';
+------------------+----------------+
| VARIABLE_NAME | VARIABLE_SCOPE |
+------------------+----------------+
| tidb_external_ts | GLOBAL |
+------------------+----------------+
1 row in set (0.01 sec)

Related PR: pingcap/tidb#38276

It's GLOBAL.

It can be turned on/off in session or global scope because the variable tidb_enable_external_ts_read is SESSION|GLOBAL. If the tidb_enable_external_ts_read = 'OFF', even when the tidb_external_ts has a value, it will have no effect. See the document https://docs.pingcap.com/tidb/stable/tidb-external-ts/#read-historical-data-using-the-tidb_external_ts-variable

@Oreoxmt Oreoxmt linked a pull request Mar 28, 2025 that will close this issue
15 tasks
@Oreoxmt
Copy link
Collaborator

Oreoxmt commented Mar 28, 2025

To make the description in Stale Read Usage clearer and avoid misunderstandings, I have submitted these PRs for an update:

@YangKeao PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants