Przeglądaj źródła

Handle errors when converting lazyfiles to eagerfiles

GitOrigin-RevId: 6ada48e2f2b7ffee9c8560856436dc5e2076099d
Andrew Rumble 1 rok temu
rodzic
commit
34b674aa6f

+ 10 - 1
services/history-v1/storage/lib/backupArchiver.mjs

@@ -298,7 +298,16 @@ async function addChunkToArchive(
         logger.error({ filePath }, 'File not found in snapshot')
         logger.error({ filePath }, 'File not found in snapshot')
         continue
         continue
       }
       }
-      await file.load('eager', blobStore)
+
+      try {
+        await file.load('eager', blobStore)
+      } catch (err) {
+        logger.error(
+          { filePath, err },
+          'Failed to load file from snapshot, skipping'
+        )
+        continue
+      }
 
 
       const hash = file.getHash()
       const hash = file.getHash()