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 =
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)