Skip to content

Connection won't be re-established if DNS has a delay #9894

@rleungx

Description

@rleungx

Bug Report

What did you do?

We have a cache to manage the mapping between URL and gRPC connection:

clientConns sync.Map // Store as map[string]*grpc.ClientConn

But if the DNS has a delay, the gRPC connection won't be re-established. If the pod IP can be reused, there is a possibility that the request is sent to the wrong place. We have encountered this issue in the serverless environment, which causes the tso request to be sent to the tso server, which is not the primary. And the client keeps trying at the same connection, which is wrong until the TiDB is restarted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-8.5This bug affects the 8.5.x(LTS) versions.severity/majortype/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions