From 8582180c1189b757c7c7017544fc2c3de1b69133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=88=E8=BD=A9?= Date: Mon, 11 Sep 2023 17:30:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(region):=20=E9=81=BF=E5=85=8D=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E4=BA=91=E8=B4=A6=E5=8F=B7=E6=97=B6=E9=81=97=E7=95=99?= =?UTF-8?q?=E8=84=8F=E6=95=B0=E6=8D=AE=20(#17991)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/compute/models/cloudaccounts.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/compute/models/cloudaccounts.go b/pkg/compute/models/cloudaccounts.go index 29ee0ae385..0fbf0efad9 100644 --- a/pkg/compute/models/cloudaccounts.go +++ b/pkg/compute/models/cloudaccounts.go @@ -2217,6 +2217,8 @@ func (manager *SCloudaccountManager) AutoSyncCloudaccountStatusTask(ctx context. }() log.Debugf("syncAccountStatus %s %s", id, name) ctx = context.WithValue(ctx, "id", id) + lockman.LockObject(ctx, account) + defer lockman.ReleaseObject(ctx, account) err := account.syncAccountStatus(ctx, userCred) if err != nil { log.Errorf("unable to syncAccountStatus for cloudaccount %s: %s", account.Id, err.Error())