diff --git a/server/pkg/repo/object_copies.go b/server/pkg/repo/object_copies.go index 7d6fe6f7e5..31443e25c5 100644 --- a/server/pkg/repo/object_copies.go +++ b/server/pkg/repo/object_copies.go @@ -35,6 +35,7 @@ func (repo *ObjectCopiesRepository) GetAndLockUnreplicatedObject(ctx context.Con } } + // todo:(neeraj) reduce the gap between last_attempt and now_utc_micro_seconds from 7 days to 1 day row := tx.QueryRowContext(ctx, ` SELECT object_key, want_b2, b2, want_wasabi, wasabi, want_scw, scw FROM object_copies @@ -42,7 +43,7 @@ func (repo *ObjectCopiesRepository) GetAndLockUnreplicatedObject(ctx context.Con ( (wasabi IS NULL AND want_wasabi = true) OR (scw IS NULL AND want_scw = true) - ) AND last_attempt < (now_utc_micro_seconds() - (24::BIGINT * 60 * 60 * 1000 * 1000)) + ) AND last_attempt < (now_utc_micro_seconds() - (7* 24::BIGINT * 60 * 60 * 1000 * 1000)) ) LIMIT 1 FOR UPDATE SKIP LOCKED