Skip to content

sql: remove enforce_home_region_follower_reads_enabled #113765

@miraradeva

Description

@miraradeva

Currently, the enforce_home_region_follower_reads_enabled feature uses (1) savepoint rollback and (2) follower reads to dynamically detect a home region for a query which encountered "Query has no home region" error. (1) is used to roll back the original failed read, and (2) is used to ensure that while we try different regions to find the home region we don't actually serve remote reads.

In #111228 we want to change the behavior of savepoint rollbacks to not drop the accumulated read spans, and instead ensure those reads are serializable even after the rollback. This change breaks the above enforce_home_region_follower_reads_enabled functionality because (1) no longer removes the original failed read from the txn's read span, and as a result (2) fails to use AOST because the txn has preceding reads.

Ideally, we would change the behavior of enforce_home_region_follower_reads_enabled to work with the new savepoint behavior but it's unclear how to best approach this. In the mean time, after discussing with @michae2, we agreed we can limit the behavior of enforce_home_region_follower_reads_enabled to work only for queries that already use AOST. This will help because we no longer need to do part (2).

Jira issue: CRDB-33142

Metadata

Metadata

Assignees

Labels

C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries Teamv25.4.0-prerelease

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions