# TiFlash Restart Query Impact Knowledge

<!-- auto-oncall-optimization-record
{
  "schemaVersion": "auto-oncall-optimization-record-v1",
  "optimizationId": "tiflash-restart-query-impact-2026-08-20",
  "problems": [
    {
      "problemId": "tiflash-restart-impact-intent-not-answered",
      "summary": "When the customer already says a TiFlash host must restart and asks about running-SQL impact and avoidance, Auto Oncall can reopen root-cause discovery instead of answering the version-specific graceful-shutdown boundary.",
      "status": "optimized_verified",
      "applicability": "Planned TiFlash process or host restart questions asking about in-flight SQL impact or avoidance, especially on TiDB v7.5.6 or another version before v8.5.4.",
      "issueKeys": ["APID-29273"],
      "sourceRefs": ["https://tidb.atlassian.net/browse/APID-29273#problem:tiflash-restart-impact-intent-not-answered"],
      "signalTextIncludesAny": ["主要是让我们确认影响", "业务SQL会报错 有办法规避吗", "v7.5.6 tiflash 没有 graceful shutdown"],
      "observedThrough": "2026-08-20",
      "effectiveAt": "2026-08-21T06:33:18Z",
      "verifiedAt": "2026-08-21T06:33:18Z",
      "attemptedAction": "Recall one version-bounded TiFlash restart topic so the semantic owner answers the requested SQL-impact and avoidance question: v7.5.6 cannot gracefully drain running MPP tasks, multiple replicas do not protect an already-running task, low-traffic sequential restart only reduces rather than eliminates failures, and TIFLASH_REPLICA.AVAILABLE is not misread as an available-instance count.",
      "evidenceUrl": "https://tidb.atlassian.net/browse/APID-29273?focusedCommentId=23350886"
    }
  ]
}
-->

- Optimization ID: `tiflash-restart-query-impact-2026-08-20`
- Owner: repository product knowledge selected by the semantic answer owner
- Source reference: `APID-29273`, TiDB v8.5.4 release notes, and TiFlash issue
  `#10266`
- Implementation status: merged and deployed to staging
- Effective status: `optimized_verified`

## Bounded problem

The customer already stated that one TiFlash host needed a restart, supplied
v7.5.6, and asked whether running SQL would fail and whether that could be
avoided. The original Auto Oncall answer reopened bug and metric discovery,
gave only generic replica risk, and asked for information before answering the
actual impact question.

The missing decision is versioned product behavior and user-intent handling,
not OP telemetry. The human answer established that v7.5.6 lacks TiFlash
graceful shutdown, so in-flight SQL errors cannot be completely avoided; a
low-traffic sequential restart only reduces impact.

## Candidate change

- Recall one topic from planned TiFlash restart, exact v7.5.6, or graceful-
  shutdown language.
- Answer impact and avoidance before discussing root cause or requesting more
  context.
- Distinguish replica availability from in-flight MPP task continuity.
- Keep production approval and execution human-owned.

## Verification status

At `2026-08-20T22:19:47+08:00`, a tool-free offline simulation supplied only
the cutoff-visible APID-29273 customer context and the bounded recalled topic;
it did not supply the human answer or use OP, Jira, or DB data. The generated
answer:

- directly said that terminating TiFlash v7.5.6 can fail an in-flight MPP SQL;
- said low-traffic, one-host-at-a-time restart reduces but cannot eliminate the
  error window;
- included the v8.5.4 graceful-shutdown boundary without promising zero impact;
- explained that replicas do not migrate an already-running MPP task; and
- correctly treated `TIFLASH_REPLICA.AVAILABLE=1` as a Boolean availability
  indicator, not one available instance.

An independent tool-free Judge compared this output with the historical human
answer and returned `ai_better`, with no missing or incorrect item.

PR [#1046](https://github.com/tidbcloud/aisupport/pull/1046) merged the bounded
product-knowledge topic and recall contract. Staging image `455679d1` contains
that commit and was Ready when the result was reconciled. Because Wetech OP is
now intentionally disabled and cannot provide an applicable historical replay,
the user accepted the cutoff-bounded, no-provider simulation as the equivalent
case-specific evaluation for this semantic problem.

The verified simulated customer/internal response was written in place to Jira
internal comment `23350886`; readback confirmed `public=false` and the expected
version-bounded TiFlash restart guidance. The canonical evaluation was then
recorded as `source=analyze_write`, `verdict=ai_better` for the historical owner
run and the APID-29273 Base row read back as acceptable.

## Unresolved gaps

The unavailable historical OP environment still prevents a provider-backed
replay. This verification covers the answer-intent and versioned product-
knowledge criterion only; it does not verify historical cluster telemetry or
restore Wetech OP evidence acquisition.

## Next validation action

Monitor a later TiFlash restart-impact question to confirm the same topic is
recalled without manual simulation. If a supported provider becomes available,
retain the existing production-operation handoff and validate telemetry only as
a separate problem.
