diff --git a/as-of-timestamp.md b/as-of-timestamp.md index 07fa1a9b2544b..baa31b39a4a45 100644 --- a/as-of-timestamp.md +++ b/as-of-timestamp.md @@ -10,6 +10,13 @@ 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. TiDB supports reading historical data through a standard SQL interface, which is the `AS OF TIMESTAMP` SQL clause, without the need for special clients or drivers. After data is updated or deleted, you can read the historical data before the update or deletion using this SQL interface.