---
schema_version: 1
id: tikv-read-iops-full-ranking-across-two-premium-clusters-during-incident-window
title: Cluster-scoped TiKV full ranking by max sampled node-disk read IOPS
  across two premium clusters in the latest completed Beijing 11:00-11:05 window
status: draft
owner: codex
evaluation:
  mode: adhoc_evidence
environment:
  profile: stable-premium
  cluster_id_a: '10748116073341772391'
  cluster_id_b: '10530333593343689954'
  cluster_type: premium
  tidb_version: v8.5.x
  parent_id_a: '2026948324023603200'
  parent_id_b: '2026601847170531328'
  provider_a: alicloud
  provider_b: alicloud
  region_a: ap-southeast-1
  region_b: ap-southeast-1
  infra_uuid_a: '019c9953-9f93-7daa-b097-e18a68c2b107'
  infra_uuid_b: '019c9495-b1ea-7768-bba4-94954b4acbed'
  prefetched_input_path: prefetched_input.json
time_window:
  resolved_by_output: case_input
runtime:
  hooks:
  - id: prepare_case_input
    stage: before_acp
    kind: python_script
    path: runtime_hook.py
    output_id: case_input
    args:
    - prepare-case-input
    - "--cluster-id-a"
    - "{{environment.cluster_id_a}}"
    - "--cluster-id-b"
    - "{{environment.cluster_id_b}}"
    - "--local-hour"
    - '11'
    - "--local-minute"
    - '0'
    - "--duration-minutes"
    - '5'
    - "--step-seconds"
    - '60'
    - "--prefetched-input-path"
    - "{{environment.prefetched_input_path}}"
  - id: build_runtime_reference
    stage: before_judge
    kind: python_script
    path: runtime_hook.py
    output_id: reference_answer
    args:
    - build-reference
    - "--cluster-id-a"
    - "{{environment.cluster_id_a}}"
    - "--cluster-id-b"
    - "{{environment.cluster_id_b}}"
    - "--parent-id-a"
    - "{{environment.parent_id_a}}"
    - "--parent-id-b"
    - "{{environment.parent_id_b}}"
    - "--provider-a"
    - "{{environment.provider_a}}"
    - "--provider-b"
    - "{{environment.provider_b}}"
    - "--region-a"
    - "{{environment.region_a}}"
    - "--region-b"
    - "{{environment.region_b}}"
    - "--infra-uuid-a"
    - "{{environment.infra_uuid_a}}"
    - "--infra-uuid-b"
    - "{{environment.infra_uuid_b}}"
    - "--start"
    - "{{runtime.case_input.start}}"
    - "--end"
    - "{{runtime.case_input.end}}"
    - "--step-seconds"
    - '60'
    - "--case-input-output-id"
    - case_input
prompt:
  text: |
    帮我把这两个 Premium 集群 {{environment.cluster_id_a}} 和 {{environment.cluster_id_b}} 在 {{runtime.case_input.start}} 到 {{runtime.case_input.end}} 这 5 分钟里的所有 TiKV 节点读盘 IOPS 峰值排一下。

    我只关心最后结果：
    1. 先按 `cluster_id` 字典序排 cluster；
    2. 每个 cluster 内，把所有 TiKV 节点按这 5 分钟窗口里的 `max_1m_read_iops` 从高到低排完，不要只给 top 3；
    3. 如果同一个 cluster 内 `max_1m_read_iops` 一样，就按 `tikv_node` 字典序排；
    4. 最终只输出一个 `json` 代码块，字段必须严格为：
       `window`、`mapping_strategy`、`evidence_sufficient`、`nodes_by_cluster`
    5. `nodes_by_cluster` 里的每个元素必须严格包含：
       `cluster_id`、`nodes`
    6. `nodes` 必须是数组，里面每个元素都必须严格是：
       `["<tikv_node>", <max_1m_read_iops>]`
    7. 不要输出额外字段，不要输出额外解释，不要把说明写进 JSON。

    {{runtime.case_input.prefetched_infra_prompt}}

    JSON 结构如下：

    ```json
    {
      "window": {
        "start": "2026-01-01T03:00:00Z",
        "end": "2026-01-01T03:05:00Z"
      },
      "mapping_strategy": "node_filter",
      "evidence_sufficient": true,
      "nodes_by_cluster": [
        {
          "cluster_id": "10530333593343689954",
          "nodes": [
            ["db-tikv-0", 23456.78],
            ["db-tikv-1", 21000.01]
          ]
        },
        {
          "cluster_id": "10748116073341772391",
          "nodes": [
            ["db-tikv-0", 12345.67],
            ["db-tikv-1", 12222.22]
          ]
        }
      ]
    }
    ```

    如果证据不足，请把 `evidence_sufficient` 设为 `false`，并把 `nodes_by_cluster` 设为空数组。
tags:
- storage-performance
- metric-scope
- read-iops
- multi-cluster
- structured-output
case_tier: P1
cost_tier: medium
followup:
  scheduled_max_followups: 0
execution:
  acp_bash_timeout_s: 420
