diff --git a/cmd/restic/cmd_prune.go b/cmd/restic/cmd_prune.go index d62a7df75..7872589be 100644 --- a/cmd/restic/cmd_prune.go +++ b/cmd/restic/cmd_prune.go @@ -162,9 +162,6 @@ func runPrune(ctx context.Context, opts PruneOptions, gopts GlobalOptions, term } func runPruneWithRepo(ctx context.Context, opts PruneOptions, gopts GlobalOptions, repo *repository.Repository, ignoreSnapshots restic.IDSet, term *termstatus.Terminal) error { - // we do not need index updates while pruning! - repo.DisableAutoIndexUpdate() - if repo.Cache == nil { Print("warning: running prune without a cache, this may be very slow!\n") } diff --git a/internal/repository/packer_manager.go b/internal/repository/packer_manager.go index c7599f5af..76734fb87 100644 --- a/internal/repository/packer_manager.go +++ b/internal/repository/packer_manager.go @@ -200,8 +200,5 @@ func (r *Repository) savePacker(ctx context.Context, t restic.BlobType, p *packe r.idx.StorePack(id, p.Packer.Blobs()) // Save index if full - if r.noAutoIndexUpdate { - return nil - } return r.idx.SaveFullIndex(ctx, r) } diff --git a/internal/repository/repository.go b/internal/repository/repository.go index d9dfc4556..f0ef93ecf 100644 --- a/internal/repository/repository.go +++ b/internal/repository/repository.go @@ -42,8 +42,6 @@ type Repository struct { opts Options - noAutoIndexUpdate bool - packerWg *errgroup.Group uploader *packerUploader treePM *packerManager @@ -130,12 +128,6 @@ func New(be backend.Backend, opts Options) (*Repository, error) { return repo, nil } -// DisableAutoIndexUpdate deactives the automatic finalization and upload of new -// indexes once these are full -func (r *Repository) DisableAutoIndexUpdate() { - r.noAutoIndexUpdate = true -} - // setConfig assigns the given config and updates the repository parameters accordingly func (r *Repository) setConfig(cfg restic.Config) { r.cfg = cfg @@ -526,10 +518,6 @@ func (r *Repository) Flush(ctx context.Context) error { return err } - // Save index after flushing only if noAutoIndexUpdate is not set - if r.noAutoIndexUpdate { - return nil - } return r.idx.SaveIndex(ctx, r) }