cockroachdb / cockroachdb/cockroach
ccl/multiregion,regionlatency: unit tests are partially incorrect because cross-region latencies are not properly simulated with secondary tenants
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
This shares the same cause as #109867.
**Describe the problem**
The tests in the ccl/multiregion package depend on the `regionlatency` package to simulate cross-region latencies in a TestCluster. However, this is not done properly for secondary tenants.
This is because `regionlatency` injects the latencies only between the KV nodes, but not between the SQL servers.
Consider the connectivity diagram:
```
SQL <---(a)---> SQL
^ ^
| |
(b) (b)
| |
v v
KV <---(c)---> KV
```
The simulated latencies are injected for the connections of type (c), not in type (a) as they should.
**Expected behavior**
In the diagram above (a) and (c) should both use extra latencies.
Epic: CRDB-26687
Jira issue: CRDB-31126
Contributor guide
Research direction
Start in the ccl/multiregion tests and the regionlatency package, then trace how TestCluster connectivity is configured for secondary tenants. Compare the SQL-server and KV-node paths shown in the issue and run the affected unit tests. Done means both SQL and KV cross-region connections use the extra simulated latency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases, distributed-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100