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 timestamp bounded read-only transactions on data replicas Tasklist #21094

Closed
33 of 45 tasks
NingLin-P opened this issue Nov 16, 2020 · 8 comments
Closed
33 of 45 tasks
Assignees
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@NingLin-P
Copy link
Contributor

NingLin-P commented Nov 16, 2020

Development Task

Timestamp bounded read-only transactions return stale data within a user-provided staleness bound, and can provide better performance than normal read-only transactions:

  • Can perform at replicas that don't have the most up-to-date data, so the ReadIndex request can be avoided and reduce the network latency cost, especially in cross-region deployment.
  • With the specified staleness, write-read conflict can be greatly reduced

Issue: #19817
Propoasl: Follower to serve local(stale) read (In Chinese)

New feature

Basic work

Timestamp bounded read-only transactions

Supports SET TRANSACTION READ ONLY AS OF #22765

Supports Select statement with ASOF #24557

TiKV

TODO:

  • Add metric
@NingLin-P NingLin-P added the type/enhancement The issue or PR belongs to an enhancement. label Nov 16, 2020
@5kbpers
Copy link
Contributor

5kbpers commented Nov 27, 2020

For decoupling Resolved TS, may include the following changes:

  • Move the CmdObserver implementation of CdcObserver to resolved ts package
  • Start a new thread for capturing changes from apply worker, tracking the lock, and redirecting changes to cdc thread
  • Provide an interface (through an atomic variable) for getting the current resolved ts

@nolouch
Copy link
Member

nolouch commented Dec 8, 2020

Hi, @sunxiaoguang , Is anyone interested in #21522 and #21540

@Yisaer
Copy link
Contributor

Yisaer commented May 19, 2021

assign Supports SET TRANSACTION READ ONLY AS OF

@JmPotato
Copy link
Member

assign Errors handling.

@tisonkun
Copy link
Contributor

tisonkun commented Jun 16, 2021

Hi @NingLin-P ! I'd like to know that is stale read included in v5.1.0?

@xhebox
Copy link
Contributor

xhebox commented Jun 16, 2021

@tisonkun It is in release-5.1 branch, fixing bugs and testing. But you could try if you like.

@tisonkun
Copy link
Contributor

@xhebox thanks!

@yiwu-arbug
Copy link

filed tikv/tikv#11015 for adding metrics for stale read

@xhebox xhebox removed their assignment Oct 29, 2021
@Yisaer Yisaer closed this as completed Feb 21, 2023
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

No branches or pull requests

8 participants