diff --git a/changelogs/unreleased/6587-Lyndon-Li b/changelogs/unreleased/6587-Lyndon-Li new file mode 100644 index 0000000000..3783804833 --- /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 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..0984826b95 100644 --- a/pkg/repository/provider/unified_repo.go +++ b/pkg/repository/provider/unified_repo.go @@ -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