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

[YSQL] Unable to set yb_read_from_followers and yb_follower_read_staleness_ms via startup parameters #25635

Open
1 task done
jameshartig opened this issue Jan 15, 2025 · 2 comments
Labels
area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage

Comments

@jameshartig
Copy link
Contributor

jameshartig commented Jan 15, 2025

Jira Link: DB-14886

Description

We set yb_read_from_followers=true and yb_follower_read_staleness_ms=3000 via PG Startup Message parameters. In 2.20.x this works fine but while testing 2024.2 internally we ran into the following error:

FATAL: SET yb_read_from_followers must be called before any query (SQLSTATE 25001)

I believe this is related to 79888cf. The commit mentions setting ysql_follower_reads_behavior_before_fixing_20482 gflag to restore the old behavior but that gflag doesn't seem to exist as the tserver crashes. See comments.

Here's the startup packet that's sent:

Image

and here's the response to that packet:

Image

Issue Type

kind/bug

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@jameshartig jameshartig added area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels Jan 15, 2025
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Jan 15, 2025
@acube123
Copy link

The flag is ysql_yb_follower_reads_behavior_before_fixing_20482 (starting with ysql_yb_)

@jameshartig
Copy link
Contributor Author

Adding ysql_yb_follower_reads_behavior_before_fixing_20482=true to the tserver gflags does seem to fix the issue. It doesn't seem intentional to disallow the follower read flags to be set at the connection-level though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage
Projects
None yet
Development

No branches or pull requests

3 participants