Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Comment thread
TomShawn marked this conversation as resolved.
>
> 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.

Comment thread
TomShawn marked this conversation as resolved.
> **Warning:**
> **Note:**
Comment thread
TomShawn marked this conversation as resolved.
>
> 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