tikv / tikv/pd

TestCluster retry can generate inconsistent initial cluster URLs

Open
#10,954 1 comment 0 reactions 0 assignees View on GitHub
component/testing type/ci
Dominant language
Go
Stars
1.2k
Forks
783
Avg merge
5d 21h
Merged PRs (30d)
36

Description

## Flaky Test

### Which jobs are failing

`pull-unit-test-next-gen-3` and similar next-gen unit test shards can fail while starting a PD test cluster.

### CI link

https://prow.tidb.net/view/gs/prow-tidb-logs/pr-logs/pull/tikv_pd/10951/pull-unit-test-next-gen-3/2071792824004644864

### Reason for failure (if possible)

The initial server retry path regenerates each server's URLs immediately before generating that server's config. Since config generation reads all initial servers' peer URLs to compose `initial-cluster`, early servers can see a mix of regenerated URLs and stale URLs from the previous retry. That can make etcd peers contact different clusters and fail with `Etcd cluster ID mismatch`.

### Anything else

PR #10953 fixes the retry path by regenerating all initial server URLs before building any server config.

Contributor guide

Open the contributing guide

Research direction

Start with the TestCluster retry path and the failing pull-unit-test-next-gen-3 log linked in the issue. Check how initial server URLs and server configs are generated across retries; done means the retry no longer produces mixed initial-cluster peer URLs or Etcd cluster ID mismatch failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.