cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.16k stars 3.82k forks source link

crosscluster/physical: disable auto stats jobs on the standby tenant #135828

Open msbutler opened 1 day ago

msbutler commented 1 day ago

The stats jobs are running and continuously failing, creating a lot of noise in the logs.

I241120 15:14:45.919372 536844 sql/distsql_plan_stats.go:206 ⋮ [T4,Vdestination-tenant-readonly,n3,job=AUTO CREATE STATS id=1022509992777908227,create-stats-distsql] 3004  using computed sample size of 10000 for histogram construction
I241120 15:14:45.951649 536844 jobs/registry.go:1591 ⋮ [T4,Vdestination-tenant-readonly,n3] 3005  AUTO CREATE STATS job 1022509992777908227: stepping through state reverting with error: delete-statistics: cannot mutate materialized view ‹"table_statistics"›

We made a deliberate decision that the standby queries would rely on the replicating table stats table: https://github.com/msbutler/cockroach/blob/master/pkg/sql/catalog/replication/reader_catalog.go#L277

Jira issue: CRDB-44742

blathers-crl[bot] commented 1 day ago

cc @cockroachdb/disaster-recovery

blathers-crl[bot] commented 1 day ago

Hi @msbutler, please add branch-* labels to identify which branch(es) this C-bug affects.

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.