[server] Retry replication after 7 day instead of 1 (temp change)

This commit is contained in:
Neeraj Gupta
2024-11-29 11:11:28 +05:30
parent 6703f16caa
commit 99ad1068f0

View File

@@ -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