Summary
In v1, when upgrading TiDB pods (image/config/resource changes), the upgrader
processes exactly one pod per reconciliation cycle, regardless of how many
pods need updating.
Affected Component
pkg/manager/member/tidb_upgrader.go (and equivalent for TiKV, TiFlash, PD)
Root Cause
tidbUpgrader.Upgrade() iterates pod ordinals from highest to lowest and calls
upgradeTiDBPod() which sets the StatefulSet RollingUpdate.Partition to that
one ordinal. The reconciliation then returns and waits for that pod to become
available before proceeding to the next ordinal in the following cycle.
Impact
For N pods needing rolling updates, N reconciliation cycles are required — each
cycle introducing overhead from pod restart time, readiness probe wait, and
controller cache sync.
Related
Environment
- Version: v1 (
pkg/manager/member)
- Applies to: TiDB, TiKV, TiFlash, PD upgraders
Summary
In v1, when upgrading TiDB pods (image/config/resource changes), the upgrader
processes exactly one pod per reconciliation cycle, regardless of how many
pods need updating.
Affected Component
pkg/manager/member/tidb_upgrader.go(and equivalent for TiKV, TiFlash, PD)Root Cause
tidbUpgrader.Upgrade()iterates pod ordinals from highest to lowest and callsupgradeTiDBPod()which sets the StatefulSetRollingUpdate.Partitionto thatone ordinal. The reconciliation then returns and waits for that pod to become
available before proceeding to the next ordinal in the following cycle.
Impact
For N pods needing rolling updates, N reconciliation cycles are required — each
cycle introducing overhead from pod restart time, readiness probe wait, and
controller cache sync.
Related
Environment
pkg/manager/member)