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

[Docs] Follower Reads documentation should be changed wrt expected behaviour #15233

Closed
lizayugabyte opened this issue Dec 6, 2022 · 0 comments · Fixed by #15234
Closed

[Docs] Follower Reads documentation should be changed wrt expected behaviour #15233

lizayugabyte opened this issue Dec 6, 2022 · 0 comments · Fixed by #15234
Assignees
Labels
area/documentation Documentation needed

Comments

@lizayugabyte
Copy link
Contributor

Description

Relates to #14675

A change is required in https://docs.yugabyte.com/preview/explore/ysql-language-features/going-beyond-sql/follower-reads-ysql/#expected-behavior based on the following slack exchange:

Mikhail Bautin
Why was "read happens from closest follower" replaced with "read happens from closest tablet" for yb_read_from_followers? Each row resides in a particular tablet and we can't choose to read it from this tablet or that tablet based on which is closer. Each tablet has multiple replicas, and with yb_read_from_followers enabled, we allow reading from the closest follower of the tablet rather than always reading from the leader. So, this particular change is actually wrong.

Liza Rekadze
There was doc ticket asking to replace follower by tablet in this document. The commit belongs to the PR addressing this ticket: #14675
Perhaps Marko Rajcevic could clarify.

Marko Rajcevic
My understanding was that even if we read from the leader we read from Now()-yb_follower_read_staleness_ms. So regardless if it was the leader or a follower you are going to potentially have some staleness. That was the intent of the change, it was meant to avoid confusion with users assuming that only followers will be read from Now()-yb_follower_read_staleness_ms. Would you recommend to keep it as "read happens from closest follower" or a different phrase all together?

Mikhail Bautin
It is correct that the read could still be done from the leader. But it never happens from a different tablet.
Suggestion:
"read happens from the closest replica of the tablet, which could be leader or follower" (edited)

Marko Rajcevic
Thanks, good catch.
Can we make the edits above?

@lizayugabyte lizayugabyte added the area/documentation Documentation needed label Dec 6, 2022
@lizayugabyte lizayugabyte self-assigned this Dec 6, 2022
jayant07-yb pushed a commit to jayant07-yb/yugabyte-db that referenced this issue Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Documentation needed
Projects
None yet
1 participant