Skip to content

upgrade: reduce replication factor of SQL stats tables#169073

Draft
kyle-a-wong wants to merge 1 commit intocockroachdb:masterfrom
kyle-a-wong:sql_stats_replication_factor
Draft

upgrade: reduce replication factor of SQL stats tables#169073
kyle-a-wong wants to merge 1 commit intocockroachdb:masterfrom
kyle-a-wong:sql_stats_replication_factor

Conversation

@kyle-a-wong
Copy link
Copy Markdown
Contributor

Summary

  • Adds cluster version V26_3_ReduceSQLStatsReplicationFactor and a tenant
    upgrade that overrides the zone configuration of
    system.statement_statistics and system.transaction_statistics to set
    num_replicas = 3 instead of inheriting the cluster default of 5.
  • Wires the same change into bootstrapCluster so newly-created clusters
    pick up the reduced replication factor at bootstrap.
  • These tables hold observability data; the loss-tolerance of 3x
    replication is acceptable, while halving their replication storage
    footprint and write amplification.

Epic: none

Release note (ops change): The system.statement_statistics and
system.transaction_statistics tables now use a replication factor of 3
instead of inheriting the cluster default of 5.

Add cluster version V26_3_ReduceSQLStatsReplicationFactor and a tenant
upgrade that overrides the zone configuration of
system.statement_statistics and system.transaction_statistics to set
num_replicas = 3 instead of inheriting the cluster default of 5. The
same change is wired into bootstrapCluster so newly-created clusters
pick up the reduced replication factor at bootstrap.

These tables hold observability data; the loss-tolerance of 3x
replication is acceptable, while halving their replication storage
footprint and write amplification.

Release note (ops change): The system.statement_statistics and
system.transaction_statistics tables now use a replication factor of 3
instead of inheriting the cluster default of 5.
@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io Bot commented Apr 24, 2026

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants