From 522bacf3646202ad449bd364b3e32fb9e034c1b4 Mon Sep 17 00:00:00 2001 From: BornChanger Date: Mon, 22 May 2023 17:03:13 +0800 Subject: [PATCH] *: code format Signed-off-by: BornChanger --- br/pkg/aws/ebs.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/br/pkg/aws/ebs.go b/br/pkg/aws/ebs.go index 2b06d010cb8c9..4e4436cf11423 100644 --- a/br/pkg/aws/ebs.go +++ b/br/pkg/aws/ebs.go @@ -368,6 +368,7 @@ func (e *EC2Session) CreateVolumes(meta *config.EBSBasedBRMeta, volumeType strin } return "" } + workerPool := utils.NewWorkerPool(e.concurrency, "create volume") for i := range meta.TiKVComponent.Stores { store := meta.TiKVComponent.Stores[i] @@ -377,12 +378,14 @@ func (e *EC2Session) CreateVolumes(meta *config.EBSBasedBRMeta, volumeType strin log.Debug("create volume from snapshot", zap.Any("volume", oldVol)) req := template - req.SetSnapshotId(oldVol.SnapshotID) + req.SetSnapshotId(oldVol.SnapshotID) + + // set target AZ if targetAZ == "" { req.SetAvailabilityZone(oldVol.VolumeAZ) } else { req.SetAvailabilityZone(targetAZ) - + } // Copy interested tags of snapshots to the restored volume tags := []*ec2.Tag{