cockroachdb / cockroachdb/docs

Clarify that follower reads are not currently a guarantee of low latency and discuss some more factors that can affect them

Open
#5,024 8 comments 0 reactions 1 assignee Claimed by @rmloveland View on GitHub
C-doc-improvement O-eng P-1 T-incorrect-or-unclear-info
Dominant language
HTML
Stars
212
Forks
476
Avg merge
40m
Merged PRs (30d)
3

Description

Jesse Seldess (jseldess) commented:

In this PR on topology patterns, @bdarnell called into questions some explicit statements we're making about follower reads, namely that follower reads are available for any read operation at least 48 seconds in the past, and that the `experimental_follower_read_timestamp()` function is the best way to get a follower read:

> Note that this function does not guarantee that a follower read will be performed. It picks a timestamp that should usually result in a follower read, but may perform a remote leaseholder read if things are falling behind.
>
> I'm wary of documenting this function while it's experimental; I think it might be better to have the user hard-code the amount of staleness they can tolerate in the query.
>
> It does pick a timestamp a minute in the past, but that doesn't guarantee a follower read. If things are falling behind, the threshold for performing follower reads increases and this function is not currently aware of that (hard coding the interval would have the same problem). We do not currently provide any tools that would offer a stronger guarantee of being able to perform a follower read.

Jira Issue: DOC-288

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.