pd-placement-rules

Diagnose PD placement rule, placement policy, and isolation label incidents in TiDB clusters.

Updated Jun 3, 2026
One-click install
npx skills add https://github.com/alex-quan-001/nutshell-skills --skill pd-placement-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pd-placement-rules
Source: https://github.com/alex-quan-001/nutshell-skills/tree/main/skills/diagnosis/pd-placement-rules
Command: npx skills add https://github.com/alex-quan-001/nutshell-skills --skill pd-placement-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill eliminates the guesswork for on-call engineers diagnosing complex PD placement rule, placement policy, and isolation label incidents that cause leader imbalance, replica misplacement, GC errors, or unexpected rule overrides in TiDB clusters.

Core Features & Use Cases

  • Known Incident Pattern Reference: Curated handbook of common placement-rule, placement-policy, and isolation-label failure patterns sourced from real production oncall tickets.
  • Diagnostic Guidance: Step-by-step first checks and proven workarounds for issues like placement rule resets after PD leader transfer, SQL placement policies overriding PD-level rules, and isolation label gaps causing co-located replicas.
  • Use Case Example: If you are investigating an incident where two region replicas landed on the same physical host after a placement rule update, this skill helps you identify missing isolation label configuration or incorrect SQL placement policy settings.

Quick Start

Use the pd-placement-rules skill to diagnose the incident where TiDB replicas are co-located on the same host following a recent placement rule adjustment.

Frequently Asked Questions about pd-placement-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why are TiDB region replicas co-located on the same physical host after a placement rule update?

TiDB region replicas become co-located on the same host after a placement rule update due to missing isolation label configuration or incorrect SQL placement policy settings overriding PD-level rules. You can diagnose this by checking location label inheritance and verifying isolation label gaps.

How do I diagnose leader imbalance and replica misplacement in a TiDB cluster?

To diagnose leader imbalance and replica misplacement in a TiDB cluster, investigate PD placement rule resets that often occur after PD leader transfers, check for unexpected rule overrides, and run diagnostic commands to analyze region distribution across TiKV nodes.

How do SQL placement policies interact with PD placement rules in TiDB?

SQL placement policies can override PD-level placement rules in TiDB, leading to unexpected rule overrides and replica misplacement. When diagnosing incidents, verify SQL placement policy settings to ensure they do not conflict with intended PD-level isolation labels.

How do I troubleshoot PD placement rule resets after a PD leader transfer?

Troubleshoot PD placement rule resets after a PD leader transfer by checking for unexpected rule overrides and analyzing leader distribution anomalies. Use diagnostic command examples to verify the current placement policy state and apply proven workarounds from production oncall tickets.

What are common isolation label failure patterns in TiKV during mass node failures?

Common isolation label failure patterns in TiKV during mass node failures include leader distribution anomalies and co-located replicas caused by isolation label gaps. Diagnose these incidents by reviewing location label inheritance and applying diagnostic first checks.

Can I use this diagnostic reference for GC errors caused by PD placement policies?

Yes, you can use this reference to diagnose GC errors caused by PD placement policies. It provides step-by-step first checks and proven workarounds for placement rule incidents that cause garbage collection errors in TiDB clusters sourced from real production oncall tickets.