-
Notifications
You must be signed in to change notification settings - Fork 4.1k
config, opt: teach localityMatchScore about voter_constraints #59482
Copy link
Copy link
Open
Labels
C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries TeamSQL Queries Teamdocs-donedocs-known-limitation
Description
localityMatchScore() aids in computing the scan cost of a single row, from a given index idx, based on how well the locality tiers of the gateway match the zone config constraints on idx. This allows the cost model to prioritize choosing indexes that are geographically closer over the ones that are further away from the gateway node.
With the introduction of the new voter_constraints attribute, voting replicas are constrained by the existing constraints (which apply to all replicas - voting and non-voting) as well as voter_constraints (which apply only to voting replicas). Thus, localityMatchScore() needs to be updated to include this new attribute when computing its result.
Jira issue: CRDB-3285
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries TeamSQL Queries Teamdocs-donedocs-known-limitation
Type
Projects
Status
Cold Storage