diff --git a/service/worker/handler/diff_handlers.go b/service/worker/handler/diff_handlers.go index 7a6ec8f9..be3b8850 100644 --- a/service/worker/handler/diff_handlers.go +++ b/service/worker/handler/diff_handlers.go @@ -23,6 +23,7 @@ import ( "github.com/hibiken/asynq" "github.com/redis/go-redis/v9" + "github.com/rs/zerolog" "github.com/clyso/chorus/pkg/dom" "github.com/clyso/chorus/pkg/entity" @@ -803,6 +804,7 @@ func (r *DiffSvc) EnsureObjectsDeleted(ctx context.Context, id entity.DiffFixID, return fmt.Errorf("unable to get objects to remove: %w", err) } + zerolog.Ctx(ctx).Info().Int("count", len(objectsToRemove)).Msg("EnsureObjectsDeleted: checking objects to remove") client, err := r.clients.AsCommon(ctx, location.Storage, user) if err != nil { return fmt.Errorf("unable to obtain client: %w", err) diff --git a/service/worker/handler/migration_obj_copy_handler.go b/service/worker/handler/migration_obj_copy_handler.go index f16e702d..81c7f41f 100644 --- a/service/worker/handler/migration_obj_copy_handler.go +++ b/service/worker/handler/migration_obj_copy_handler.go @@ -74,10 +74,14 @@ func (s *svc) HandleMigrationObjCopy(ctx context.Context, t *asynq.Task) (err er } fromVer, toVer := versions.From, versions.To - if fromVer != 0 && fromVer <= toVer { + isDiffFix := t.Type() == tasks.TypeDiffFixCopyS3 + if !isDiffFix && fromVer != 0 && fromVer <= toVer { logger.Info().Int("from_ver", fromVer).Int("to_ver", toVer).Msg("migration obj copy: identical from/to obj version: skip copy") return nil } + if isDiffFix { + logger.Info().Int("from_ver", fromVer).Int("to_ver", toVer).Msg("diff fix copy: proceeding with copy despite version check") + } // 1. sync obj meta and content err = lock.Do(ctx, time.Second*2, func() error { return s.copySvc.CopyObject(ctx, p.ID.User(), copy.File{ @@ -105,7 +109,11 @@ func (s *svc) HandleMigrationObjCopy(ctx context.Context, t *asynq.Task) (err er return fmt.Errorf("migration obj copy: unable to update obj meta: %w", err) } } - logger.Info().Msg("migration obj copy: done") + if isDiffFix { + logger.Info().Msg("diff fix copy: object copied successfully") + } else { + logger.Info().Msg("migration obj copy: done") + } return nil }