# [Known Issue] Historical statistics can trigger TiKV write surge and throttling ([tidb#52826](https://github.com/pingcap/tidb/issues/52826))

Source note: adapted from GitHub issue [tidb#52826](https://github.com/pingcap/tidb/issues/52826).

## Issue

- Link: [tidb#52826](https://github.com/pingcap/tidb/issues/52826)
- Summary: before `v8.2.0`, TiDB enables historical statistics by default. Recording them can generate burst writes and trigger TiKV flow-control throttling.

## Phenomenon

- TiKV reports `server is busy`.
- `raft-engine` write traffic spikes suddenly.
- No obvious large foreground transaction is found, but throttling symptoms still appear.

## Root Cause

Historical statistics recording introduces extra writes into the system. In affected versions, the feature is enabled by default, so clusters can encounter unexpected write surges even when application traffic does not appear abnormal.

## Diagnostic Steps

1. Check whether the cluster version is earlier than `v8.2.0`.
2. Check whether `tidb_enable_historical_stats` is enabled.
3. Correlate the incident window with spikes in raft-engine bytes written.
4. If TiKV reports `server is busy` without clear large foreground transactions, include this issue in the suspect set.

## Workaround

Disable historical statistics:

```sql
SET GLOBAL tidb_enable_historical_stats = "OFF";
SHOW GLOBAL VARIABLES LIKE 'tidb_enable_historical_stats';
```

## Fixed Version

- `>= v8.2.0` no longer enables the feature by default

## Related Oncall

- v7.5.6 `server is busy` triaged without large foreground transactions `TICKET-6732`
