pingcap / pingcap/tidb

TiDB fails SQL when GetExternalTimestamp temporarily unavailable without retry

Open
#60,246 0 comments 0 reactions 0 assignees View on GitHub
component/tikv-client type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

We set up the TiDB following the [quick start in Kubernetes](https://docs.pingcap.com/tidb-in-kubernetes/stable/get-started) and then executed the SQL below.

```sql
SELECT * FROM performance_schema.SESSION_VARIABLES WHERE VARIABLE_NAME='tidb_retry_limit';
```

When the internal RPC `GetExternalTimestamp` encountered temporary unavailability, the statement failed without retry and returned an error directly to the user.

However, in other scenarios invoking `GetExternalTimestamp`, the same issue occurred and revealed no fault tolerance.

### 2. What did you expect to see? (Required)

`GetExternalTimestamp` should be retried so that the statement can be executed successfully, hiding the temporary unavailability.

### 3. What did you see instead (Required)

The statement failed without retry and returned an error directly to the user.

### 4. What is your TiDB version? (Required)

```
Release Version: v8.5.0
Edition: Community
Git Commit Hash:
Git Branch: master
UTC Build Time: 2025-03-19 08:15:18
GoVersion: go1.23.7
Race Enabled: false
Check Table Before Drop: true
Store: tikv
```

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.