Skip to content

Commit

Permalink
update stale read doc for ga (#6047) (#6052)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot committed Jul 30, 2021
1 parent 4d27b79 commit bc5e698
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
8 changes: 3 additions & 5 deletions as-of-timestamp.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ This document describes how to perform the [Stale Read](/stale-read.md) feature

> **Warning:**
>
> Currently, Stale Read is an experimental feature. It is not recommended to use it in the production environment.
>
> Currently, you cannot use Stale Read together with TiFlash. If your SQL query contains the `AS OF TIMESTAMP` clause and TiDB might read data from TiFlash replicas, you might encounter an error with a message like `ERROR 1105 (HY000): stale requests require tikv backend`.
>
> To fix the problem, disable TiFlash replicas for your Stale Read query. To do that, perform one of the following operations:
>
>
> - Use the `set session tidb_isolation_read_engines='tidb,tikv'` variable.
> - Use the [hint](/optimizer-hints.md#read_from_storagetiflasht1_name--tl_name--tikvt2_name--tl_name-) to enforce TiDB to read data from TiKV.
Expand Down Expand Up @@ -47,9 +45,9 @@ Here are some examples of the `AS OF TIMESTAMP` clause:
>
> In addition to specifying a timestamp, the most common use of the `AS OF TIMESTAMP` clause is to read data that is several seconds old. If this approach is used, it is recommended to read historical data older than 5 seconds.
>
> You need to deploy the NTP service for your TiDB and PD nodes when you use Stale Read. This avoids the situation where the specified timestamp used by TiDB goes ahead of the latest TSO allocating progress (such as a timestamp several seconds ahead), or is later than the GC safe point timestamp. When the specified timestamp goes beyond the service scope, TiDB returns an error or waits for the transaction to commit.
> You need to deploy the NTP service for your TiDB and PD nodes when you use Stale Read. This avoids the situation where the specified timestamp used by TiDB goes ahead of the latest TSO allocating progress (such as a timestamp several seconds ahead), or is later than the GC safe point timestamp. When the specified timestamp goes beyond the service scope, TiDB returns an error.
>
> The `Prepare` statement and the `AS OF TIMESTAMP` syntax are not perfectly compatible. It is not recommended to use them together.
> Before v5.1.1, the `Prepare` statement and the `AS OF TIMESTAMP` syntax are not perfectly compatible. It is not recommended to use them together. Since v5.1.1, the `Prepare` statement and the `AS OF TIMESTAMP` syntax are fully compatible, and you can use them together.
## Usage examples

Expand Down
1 change: 0 additions & 1 deletion experimental-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ This document introduces the experimental features of TiDB in different versions
+ [User-Defined Variables](/user-defined-variables.md).
+ [JSON data type](/data-type-json.md) and [JSON functions](/functions-and-operators/json-functions.md).
+ [View](/information-schema/information-schema-views.md).
+ [Stale Read](/stale-read.md).

## Configuration management

Expand Down
4 changes: 2 additions & 2 deletions stale-read.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ This document describes the usage scenarios of Stale Read. Stale Read is a mecha

When you are using Steal Read, TiDB will randomly select a replica for data reading, which means that all replicas are available for data reading. If your application cannot tolerate reading non-real-time data, do not use Stale Read; otherwise, the data read from the replica might not be the latest data written into TiDB.

> **Warning:**
> **Note:**
>
> Currently, Stale Read is an experimental feature. It is not recommended to use it in the production environment.
> Since v5.1.1, Stale Read is a feature for general availability (GA).
## Scenario examples

Expand Down

0 comments on commit bc5e698

Please sign in to comment.