diff --git a/changelogs/unreleased/6587-Lyndon-Li b/changelogs/unreleased/6587-Lyndon-Li new file mode 100644 index 0000000000..d72a27778c --- /dev/null +++ b/changelogs/unreleased/6587-Lyndon-Li @@ -0,0 +1 @@ +Fix issue 6575, flush the repo after delete the snapshot, otherwise, the changes(deleting repo snapshot) cannot be committed to the repo. \ No newline at end of file diff --git a/pkg/repository/provider/unified_repo.go b/pkg/repository/provider/unified_repo.go index 592d271acc..8dc4701855 100644 --- a/pkg/repository/provider/unified_repo.go +++ b/pkg/repository/provider/unified_repo.go @@ -67,7 +67,7 @@ const ( repoOpDescMaintain = "repo maintenance" repoOpDescForget = "forget" - repoConnectDesc = "unfied repo" + repoConnectDesc = "unified repo" ) // NewUnifiedRepoProvider creates the service provider for Unified Repo @@ -302,6 +302,11 @@ func (urp *unifiedRepoProvider) Forget(ctx context.Context, snapshotID string, p return errors.Wrap(err, "error to delete manifest") } + err = bkRepo.Flush(ctx) + if err != nil { + return errors.Wrap(err, "error to flush repo") + } + log.Debug("Forget snapshot complete") return nil