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

support external timestamp read #38274

Closed
YangKeao opened this issue Sep 30, 2022 · 2 comments · Fixed by #38276
Closed

support external timestamp read #38274

YangKeao opened this issue Sep 30, 2022 · 2 comments · Fixed by #38276
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@YangKeao
Copy link
Member

YangKeao commented Sep 30, 2022

Enhancement

Add two more variables: global tidb_external_timestamp and global/session tidb_enable_external_timestamp_read.

When the tidb_enable_external_timestamp_read is on, use the tidb_external_timestamp as the timestamp to perform stale read.

The global variable tidb_external_timestamp should be stored in pd.

Senerio

This feature can be useful in the following senerio:

the data replication software (e.g. TiCDC) could use this variable to tell the downstream TiDB the data before which timestamp is safe to read. The client of the downstream TiDB could turn on tidb_enable_external_timestamp_read and read from the fully synced data.

@YangKeao YangKeao added the type/enhancement The issue or PR belongs to an enhancement. label Sep 30, 2022
@lance6716
Copy link
Contributor

Can you explain a bit of the use case of this feature?

For example, I can imagine that some data replication software periodically updates tidb_external_timestamp when replicates data to TiDB, and some connections on TiDB turned on tidb_enable_external_timestamp_read to run queries on that "near real time" timestamp.

ti-chi-bot pushed a commit to tikv/pd that referenced this issue Oct 31, 2022
close #5637, ref pingcap/tidb#38274

Signed-off-by: lhy1024 <admin@liudos.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants