cockroachdb / cockroachdb/cockroach
drt: under-replicated count check in operation need to use
Open
A-testeng-foundations
branch-master
C-bug
O-25.2.1-scale-testing
O-testcluster
T-testeng
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
We currently use `system.public.replication_stats` for checking the under-replicated ranges in `checkZeroUnderreplicatedRanges` in `pkg/cmd/roachtest/roachtestutil/operations/dependency.go`. We should be using the following query for more reliable result:
```
SELECT SUM((metrics->>'ranges.underreplicated')::DECIMAL)::INT8 AS ranges_underreplicated FROM crdb_internal.kv_store_status;
```
Jira issue: CRDB-51434
Contributor guide
Assessment
This issue has not been assessed yet.