tikv / pd

Placement driver for TiKV
Apache License 2.0
1.05k stars 721 forks source link

TestLegacyTSOServer is flaky #8600

Open wuhuizuo opened 1 month ago

wuhuizuo commented 1 month ago

Bug Report

I create a PR without any code changes, but the integration CI job "PD Test / chunks (8, TSO Integration Test) (pull_request) " failed:

[remote-peer-cluster-id=92a8a50d4bd1be75] [local-member-id=90978eff05ad95e7] [local-member-cluster-id=fa7dba492a46a30c] [error="cluster ID mismatch"]
    server_test.go:78: 
            Error Trace:    /home/runner/work/pd/pd/tests/integrations/tso/server_test.go:78
                                        /home/runner/go/pkg/mod/github.com/stretchr/testify@v1.8.4/suite/suite.go:154
                                        /home/runner/work/pd/pd/tests/integrations/tso/server_test.go:55
            Error:          Received unexpected error:
                            Etcd cluster ID mismatch, expect 18049787704975467[276](https://github.com/tikv/pd/actions/runs/10734113227/job/29768683433?pr=8598#step:4:277), got 10567878002150063733
                            github.com/tikv/pd/pkg/utils/etcdutil.CheckClusterID
                                /home/runner/work/pd/pd/pkg/utils/etcdutil/etcdutil.go:102
                            github.com/tikv/pd/server.(*Server).startEtcd
                                /home/runner/work/pd/pd/server/server.go:343
                            github.com/tikv/pd/server.(*Server).Run
                                /home/runner/work/pd/pd/server/server.go:619
                            github.com/tikv/pd/tests.(*TestServer).Run
                                /home/runner/work/pd/pd/tests/cluster.go:127
                            github.com/tikv/pd/tests.RunServer.func1
                                /home/runner/work/pd/pd/tests/cluster.go:577
                            runtime.goexit
                                /opt/hostedtoolcache/go/1.21.13/x64/src/runtime/asm_amd64.s:1650
                            github.com/tikv/pd/tests.RunServers
                                /home/runner/work/pd/pd/tests/cluster.go:589
                            github.com/tikv/pd/tests.(*TestCluster).RunInitialServers
                                /home/runner/work/pd/pd/tests/cluster.go:601
                            github.com/tikv/pd/tests/integrations/tso.(*tsoServerTestSuite).SetupSuite
                                /home/runner/work/pd/pd/tests/integrations/tso/server_test.go:77
                            github.com/stretchr/testify/suite.Run
                                /home/runner/go/pkg/mod/github.com/stretchr/testify@v1.8.4/suite/suite.go:154
                            github.com/tikv/pd/tests/integrations/tso.TestLegacyTSOServer
                                /home/runner/work/pd/pd/tests/integrations/tso/server_test.go:55
                            testing.tRunner
                                /opt/hostedtoolcache/go/1.21.13/x64/src/testing/testing.go:1595
                            runtime.goexit
                                /opt/hostedtoolcache/go/1.21.13/x64/src/runtime/asm_amd64.s:1650
            Test:           TestLegacyTSOServer
--- FAIL: TestLegacyTSOServer (2.25s)
FAIL
lhy1024 commented 4 days ago

https://github.com/tikv/pd/actions/runs/11360417425/job/31598140914?pr=8718 again