From 54d5dabdda462d45d73c2f0c4a5214779b61c555 Mon Sep 17 00:00:00 2001 From: Lyndon-Li Date: Thu, 30 May 2024 19:13:52 +0800 Subject: [PATCH] avoid unnecessary repo connect for maintenance Signed-off-by: Lyndon-Li --- pkg/repository/manager.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkg/repository/manager.go b/pkg/repository/manager.go index 97915e5c04..8a29758c2d 100644 --- a/pkg/repository/manager.go +++ b/pkg/repository/manager.go @@ -182,10 +182,6 @@ func (m *manager) PruneRepo(repo *velerov1api.BackupRepository) error { m.repoLocker.LockExclusive(repo.Name) defer m.repoLocker.UnlockExclusive(repo.Name) - prd, err := m.getRepositoryProvider(repo) - if err != nil { - return errors.WithStack(err) - } param, err := m.assembleRepoParam(repo) if err != nil { return errors.WithStack(err) @@ -208,10 +204,6 @@ func (m *manager) PruneRepo(repo *velerov1api.BackupRepository) error { return nil } - if err := prd.BoostRepoConnect(context.Background(), param); err != nil { - return errors.WithStack(err) - } - log.Info("Start to maintenance repo") maintenanceJob, err := buildMaintenanceJob(m.maintenanceCfg, param, m.client, m.namespace)