Merge pull request #19255 from overleaf/em-increase-timeout-docstore-has-ranges

Handle docstore timeouts during history migration

GitOrigin-RevId: 9b00aa039fc9646c24e69bfca51dd8e784434fc6
This commit is contained in:
Eric Mc Sween 2024-07-04 08:21:47 -04:00 committed by Copybot
parent a587d63f15
commit 01ce2721c0

View file

@ -145,8 +145,12 @@ async function quickMigration(projectId, direction = 'forwards') {
projectHasRanges = projectHasRanges =
await DocstoreManager.promises.projectHasRanges(projectId) await DocstoreManager.promises.projectHasRanges(projectId)
} catch (err) { } catch (err) {
await DocumentUpdaterHandler.promises.unblockProject(projectId) // Docstore request probably timed out. Assume the project has ranges
throw err logger.warn(
{ err, projectId },
'Failed to check if project has ranges; proceeding with a resync migration'
)
projectHasRanges = true
} }
if (projectHasRanges) { if (projectHasRanges) {
await DocumentUpdaterHandler.promises.unblockProject(projectId) await DocumentUpdaterHandler.promises.unblockProject(projectId)