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

RFC:follower read cache #116

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

mittalrishabh
Copy link

RFC to improve the performance and reliability of follower reads.

Copy link

ti-chi-bot bot commented Dec 2, 2024

Welcome @mittalrishabh! It looks like this is your first PR to tikv/rfcs 🎉

Changes to advance safe ts from raft read index response is pretty straightforward and most of the existing logic in the stale read path will be reused.
Ref counters per region need to be added in the leader to keep track of total number of pending locks and lock status need to be included in a raft read index response. These are the detailed steps
- Read index request check the lock reference counter and send its status through raft message in read index response
- Update safe ts if there are no locks at this timestamp in replica.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should locks on replicas be considered? For advancing resolved-ts or safe-ts, the current TiKV logic determines whether to update safe-ts based on the timestamp and applied index sent by the leader.
Perhaps the safe-ts update should reuse existing processes to ensure correctness.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are going to use the existing logic to update safe-ts. It is raft who is going to update safe-ts only when there are no locks on leader.

text/0113-follower-read-cache.md Show resolved Hide resolved
@mittalrishabh
Copy link
Author

@cfzjywxk @bb7133 please review it as i incorporated the comments

Copy link

ti-chi-bot bot commented Dec 13, 2024

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Successfully merging this pull request may close these issues.

3 participants