From 5abc1ec42711243cd2dacb6833842911399d52ab Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Fri, 26 Jul 2024 12:36:01 +0700 Subject: [PATCH] UBERF-7682: Fix mongo cursor on backup (#6145) Signed-off-by: Andrey Sobolev --- server/mongo/src/storage.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/server/mongo/src/storage.ts b/server/mongo/src/storage.ts index bf01af5cc7..a0cbce0118 100644 --- a/server/mongo/src/storage.ts +++ b/server/mongo/src/storage.ts @@ -845,6 +845,7 @@ abstract class MongoAdapterBase implements DbAdapter { let d = await ctx.with('next', { mode }, async () => await iterator.next()) if (d == null && mode === 'hashed') { mode = 'non-hashed' + await iterator.close() iterator = coll.find({ '%hash%': { $in: ['', null] } }) d = await ctx.with('next', { mode }, async () => await iterator.next()) }