From 01ce2721c0fc52247e7797d4239cdd6a03fd8319 Mon Sep 17 00:00:00 2001 From: Eric Mc Sween <5454374+emcsween@users.noreply.github.com> Date: Thu, 4 Jul 2024 08:21:47 -0400 Subject: [PATCH] Merge pull request #19255 from overleaf/em-increase-timeout-docstore-has-ranges Handle docstore timeouts during history migration GitOrigin-RevId: 9b00aa039fc9646c24e69bfca51dd8e784434fc6 --- .../src/Features/History/HistoryRangesSupportMigration.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/services/web/app/src/Features/History/HistoryRangesSupportMigration.js b/services/web/app/src/Features/History/HistoryRangesSupportMigration.js index ba1b1d1244..c59196e38e 100644 --- a/services/web/app/src/Features/History/HistoryRangesSupportMigration.js +++ b/services/web/app/src/Features/History/HistoryRangesSupportMigration.js @@ -145,8 +145,12 @@ async function quickMigration(projectId, direction = 'forwards') { projectHasRanges = await DocstoreManager.promises.projectHasRanges(projectId) } catch (err) { - await DocumentUpdaterHandler.promises.unblockProject(projectId) - throw err + // Docstore request probably timed out. Assume the project has ranges + logger.warn( + { err, projectId }, + 'Failed to check if project has ranges; proceeding with a resync migration' + ) + projectHasRanges = true } if (projectHasRanges) { await DocumentUpdaterHandler.promises.unblockProject(projectId)