schema_version: 1
id: topsql-links-for-hottest-two-tikv-nodes-during-incident-window
title: TopSQL links for the hottest two TiKV nodes in the latest completed Beijing 11:00-11:05 window
status: active
owner: codex
evaluation:
  mode: adhoc_evidence
environment:
  profile: stable-dedicated
  cluster_id: '10518506906906971664'
  cluster_type: dedicated
  tidb_version: v8.5.x
time_window:
  resolved_by_output: resolved_window
runtime:
  hooks:
  - id: resolve_runtime_window
    stage: before_acp
    kind: python_script
    path: runtime_hook.py
    output_id: resolved_window
    args:
      - resolve-window
      - --cluster-id
      - '{{environment.cluster_id}}'
      - --local-hour
      - '11'
      - --local-minute
      - '0'
      - --duration-minutes
      - '5'
      - --step-seconds
      - '60'
      - --top-n
      - '2'
  - id: build_runtime_reference
    stage: before_judge
    kind: python_script
    path: runtime_hook.py
    output_id: reference_answer
    args:
      - build-reference
      - --cluster-id
      - '{{environment.cluster_id}}'
      - --start
      - '{{runtime.resolved_window.start}}'
      - --end
      - '{{runtime.resolved_window.end}}'
      - --step-seconds
      - '60'
      - --top-n
      - '2'
prompt:
  text: |
    帮我看下集群 {{environment.cluster_id}} 在 {{runtime.resolved_window.start}} 到 {{runtime.resolved_window.end}} 这 5 分钟里，哪两个 TiKV 节点最热。这里“最热”按这段时间里的 `max 1m read IOPS` 算。

    你不用讲过程，也不用解释怎么查。最后只给我一个 `json` 代码块，字段严格是：
    `cluster_id`、`window`、`mapping_strategy`、`evidence_sufficient`、`topsql_links`

    `topsql_links` 必须按热度从高到低排，长度必须是 2。每个元素只能包含：
    `tikv_node`、`url`

    JSON 结构如下：

    ```json
    {
      "cluster_id": "10518506906906971664",
      "window": {
        "start": "2026-01-01T03:00:00Z",
        "end": "2026-01-01T03:05:00Z"
      },
      "mapping_strategy": "node_filter",
      "evidence_sufficient": true,
      "topsql_links": [
        {
          "tikv_node": "db-tikv-23",
          "url": "https://clinic.pingcap.com/portal/dashboard/cloud/ngm.html?clusterId=10518506906906971664#/topsql?from=1776558000&to=1776558300&instance=db-tikv-23.db-tikv-peer.tidb10518506906906971664.svc%3A20160"
        },
        {
          "tikv_node": "db-tikv-21",
          "url": "https://clinic.pingcap.com/portal/dashboard/cloud/ngm.html?clusterId=10518506906906971664#/topsql?from=1776558000&to=1776558300&instance=db-tikv-21.db-tikv-peer.tidb10518506906906971664.svc%3A20160"
        }
      ]
    }
    ```

    如果证据不足，请把 `evidence_sufficient` 设为 `false`，并把 `topsql_links` 设为空数组。
tags:
- storage-performance
- topsql
- url-generation
- structured-output
case_tier: P1
cost_tier: low
followup:
  scheduled_max_followups: 0
execution:
  acp_bash_timeout_s: 360
