Skip to content

Commit

Permalink
Merge pull request pingcap#1 from hehechen/cherry-pick-38571-to-relea…
Browse files Browse the repository at this point in the history
…se-6.1

Fix pingcap#38732
  • Loading branch information
hehechen authored Jan 6, 2023
2 parents 87b2002 + 56fc651 commit cfff6ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ddl/ddl_tiflash_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,11 @@ func pollAvailableTableProgress(schemas infoschema.InfoSchema, ctx sessionctx.Co

logutil.BgLogger().Debug("CollectTiFlashStatus", zap.Any("regionReplica", regionReplica), zap.Int64("tableID", tb.ID))

var stats helper.PDRegionStats
if err := infosync.GetTiFlashPDRegionRecordStats(context.Background(), tb.ID, &stats); err != nil {
var regionCount int
if err := infosync.GetTiFlashRegionCountFromPD(context.Background(), tb.ID, &regionCount); err != nil {
logutil.BgLogger().Error("Fail to get regionCount from PD.", zap.Int64("tableID", tb.ID))
return allReplicaReady, err
}
regionCount := stats.Count
flashRegionCount := len(regionReplica)
avail := regionCount == flashRegionCount
failpoint.Inject("PollTiFlashReplicaStatusReplaceCurAvailableValue", func(val failpoint.Value) {
Expand Down

0 comments on commit cfff6ea

Please sign in to comment.