From 16a891cd483641ff3b8d90c9eecacc875d656a21 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Thu, 25 Apr 2024 22:24:07 +0700 Subject: [PATCH] UBERF-6726: Fix clone for huge files (#5470) Signed-off-by: Andrey Sobolev --- server/backup/src/backup.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/backup/src/backup.ts b/server/backup/src/backup.ts index 2de715cd9f..a7e65308f3 100644 --- a/server/backup/src/backup.ts +++ b/server/backup/src/backup.ts @@ -229,6 +229,9 @@ export async function cloneWorkspace ( for (const c of domains) { console.log('clone domain...', c) + // We need to clean target connection before copying something. + await cleanDomain(targetConnection, c) + const changes: Snapshot = { added: new Map(), updated: new Map(), @@ -291,9 +294,6 @@ export async function cloneWorkspace ( console.log('Retrieve chunk:', needRetrieve.length) let docs: Doc[] = [] try { - // We need to clean target connection before copying something. - await cleanDomain(targetConnection, c) - docs = await sourceConnection.loadDocs(c, needRetrieve) if (clearTime) { docs = docs.map((p) => {