# TiFlash IO And Apply

## Question

Is TiFlash latency caused by raft-log production, apply consumption, wait-index,
storage IO, or another service path?

## Enter When

Use for TiFlash IO jitter, wait-index latency, raft apply wait, apply-log or
append-log latency, and TiFlash replica-read delay.

## First Batch

1. Align the user-visible TiFlash/read result with wait-index or apply-wait on
   the affected instance.
2. Compare append-log/raft production with apply-log/consumer latency.
3. Check node/disk long-tail latency and one peer/normal window.

## Decision

Separate producer and consumer. High apply wait with normal apply-log latency
does not prove disk latency; it may reflect missing/upstream raft work or queue
behavior. Require a disk/engine counterpart before attributing IO jitter.

## Strongest Alternative And Stop

Check replica readiness or upstream raft production as the strongest
alternative. Stop after the producer/consumer boundary is localized or one
exact aligned series is unavailable.
