diff --git a/as-of-timestamp.md b/as-of-timestamp.md index baa31b39a4a45..01399f06adc4f 100644 --- a/as-of-timestamp.md +++ b/as-of-timestamp.md @@ -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. @@ -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 diff --git a/experimental-features.md b/experimental-features.md index 8fa56efb15532..8ce5db812f33e 100644 --- a/experimental-features.md +++ b/experimental-features.md @@ -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 diff --git a/stale-read.md b/stale-read.md index 3736c20ca58e2..40a6e71639d1c 100644 --- a/stale-read.md +++ b/stale-read.md @@ -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