Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

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

Neeraj Gupta99ad1068f02d
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