Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#45016
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
Leavrth authored and ti-chi-bot committed Jun 28, 2023
1 parent 687b9d9 commit ed1adce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions br/pkg/restore/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2120,9 +2120,18 @@ func (rc *Client) PreCheckTableTiFlashReplica(
return err
}
for _, table := range tables {
<<<<<<< HEAD
if recorder != nil ||
(table.Info.TiFlashReplica != nil && table.Info.TiFlashReplica.Count > tiFlashStoreCount) {
if recorder != nil && table.Info.TiFlashReplica != nil {
=======
if table.Info.TiFlashReplica != nil {
// we should not set available to true. because we cannot guarantee the raft log lag of tiflash when restore finished.
// just let tiflash ticker set it by checking lag of all related regions.
table.Info.TiFlashReplica.Available = false
table.Info.TiFlashReplica.AvailablePartitionIDs = nil
if recorder != nil {
>>>>>>> a7b54adfede (br: cleanup `AvaliablePartitionIDs` for tiflash when restore (#45016))
recorder.AddTable(table.Info.ID, *table.Info.TiFlashReplica)
}
// we cannot satisfy TiFlash replica in restore cluster. so we should
Expand Down

0 comments on commit ed1adce

Please sign in to comment.