cockroachdb / cockroachdb/cockroach

server: `TestAdminAPIEvents` takes too long to run in external-process mode

Open
#142,381 0 comments 0 reactions 0 assignees View on GitHub
A-multitenancy C-investigation T-observability
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

When `TestAdminAPIEvents` runs in external-process mode, the first test case takes around 40 seconds, while the rest run within the usual time. We need to investigate why this initial warm-up takes so long.

Example:

external-process mode

```
--- PASS: TestAdminAPIEvents (41.97s)
--- PASS: TestAdminAPIEvents/events?type=drop_database (35.26s)
--- PASS: TestAdminAPIEvents/events?type=create_database (0.00s)
--- PASS: TestAdminAPIEvents/events?type=drop_table (0.00s)
--- PASS: TestAdminAPIEvents/events?type=create_table (0.00s)
--- PASS: TestAdminAPIEvents/events?type=set_cluster_setting (0.00s)
--- PASS: TestAdminAPIEvents/events?type=set_cluster_setting&limit=0&unredacted_events=true (0.00s)
--- PASS: TestAdminAPIEvents/events?type=create_table&limit=0 (0.00s)
--- PASS: TestAdminAPIEvents/events?type=create_table&limit=-1 (0.00s)
--- PASS: TestAdminAPIEvents/events?type=create_table&limit=2 (0.00s)
--- PASS: TestAdminAPIEvents/events?type=node_join (0.00s)
--- PASS: TestAdminAPIEvents/events?type=node_restart (0.00s)
--- PASS: TestAdminAPIEvents/events (0.00s)
```

vs

shared-process mode

```
--- PASS: TestAdminAPIEvents (6.57s)
--- PASS: TestAdminAPIEvents/events?type=drop_database (0.07s)
--- PASS: TestAdminAPIEvents/events?type=create_database (0.00s)
--- PASS: TestAdminAPIEvents/events?type=drop_table (0.00s)
--- PASS: TestAdminAPIEvents/events?type=create_table (0.00s)
--- PASS: TestAdminAPIEvents/events?type=set_cluster_setting (0.00s)
--- PASS: TestAdminAPIEvents/events?type=set_cluster_setting&limit=0&unredacted_events=true (0.00s)
--- PASS: TestAdminAPIEvents/events?type=create_table&limit=0 (0.00s)
--- PASS: TestAdminAPIEvents/events?type=create_table&limit=-1 (0.00s)
--- PASS: TestAdminAPIEvents/events?type=create_table&limit=2 (0.00s)
--- PASS: TestAdminAPIEvents/events?type=node_join (0.00s)
--- PASS: TestAdminAPIEvents/events?type=node_restart (0.00s)
--- PASS: TestAdminAPIEvents/events (0.00s)
```

Related: #138912

Jira issue: CRDB-48302

Contributor guide

Open the contributing guide

Research direction

Start by running the named TestAdminAPIEvents test in both external-process and shared-process modes, then inspect the test and its setup to compare the first subtest's startup path. Done means the external-process warm-up is explained and the test no longer spends roughly 40 seconds on its first case, with coverage for the regression if appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.