pingcap / pingcap/tidb

Behavior of tidb_replica_read='learner' is inconsistent with the doc description

Open
#57,663 1 comment 1 reaction 0 assignees View on GitHub
type/question
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Question

When a user sets `tidb_replica_read='learner'`, if there is no learner replica in the region, does TiDB just return an error or try another leader and follower replica?

Currently the [doc](https://docs.pingcap.com/tidb/stable/follower-read) said:

> When the value of tidb_replica_read is set to learner, TiDB reads data from the learner replica. If there is no learner replica in the Region, TiDB returns an error.

But the current behavior is:
1. Try the learner replica first
2. Try rest replicas(leader and follower)
3. If all replicas are not available, return an error.

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.