cockroachdb / cockroachdb/cockroach

cli/demo: `cockroach demo --multitenant=true --global` does not simulate latencies properly

Open
#109,867 1 comment 0 reactions 0 assignees View on GitHub
A-demo A-multitenancy C-bug T-db-server
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

The `--global` flag, which is intended to simulate extra cross-region latencies, is not implemented properly when `--multitenant=true` is also provided.

This is because it injects the latencies only between the KV nodes, but not between the SQL servers.
Consider this diagram of the typical RPC connections in a `demo` cluster:

```
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-31124

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.