You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jupiter/src/storage/mod.rs
+12-18Lines changed: 12 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -294,31 +294,25 @@ impl Storage {
294
294
{
295
295
Ok(blobs)if blobs.is_empty() => {
296
296
let friendly = format!(
297
-
"Blob {hash} not found in both object storage and metadata (likely never written or invalid request)"
297
+
"[obj_missing_in_db_and_s3] Blob {hash} not found in both object storage and metadata (likely never written or invalid request)"
298
298
);
299
299
tracing::warn!("{}", friendly);
300
300
MegaError::ObjStorageNotFound(friendly)
301
301
}
302
302
Ok(mut blobs) => {
303
-
ifletSome(blob) = blobs.pop(){
304
-
tracing::warn!(
305
-
"Object { } missing in S3 but metadata exists; possible data loss or misconfiguration",
306
-
blob.blob_id
307
-
);
308
-
MegaError::ObjStorageInconsistent(format!(
309
-
"Object{hash} missing in S3 but metadata exists; possible data loss or misconfiguration "
310
-
))
311
-
}else{
312
-
tracing::warn!(
313
-
"Object missing in S3 but metadata lookup returned unexpected empty result",
314
-
);
315
-
MegaError::ObjStorageInconsistent(format!(
316
-
"Object {hash} missing in S3 but metadata lookup returned unexpected empty result "
317
-
))
318
-
}
303
+
let blob = blobs.pop().expect(
304
+
"blobs is guaranteed non-empty here due to match guard on previous arm",
305
+
);
306
+
tracing::error!(
307
+
"[obj_missing_in_s3_but_has_meta] Object with hash {hash} missing in S3 but metadata exists in DB for blob_id {}; possible data loss or misconfiguration",
308
+
blob.blob_id,
309
+
);
310
+
MegaError::ObjStorageInconsistent(format!(
311
+
"[obj_missing_in_s3_but_has_meta] Object {hash} missing in S3 but metadata exists; possible data loss or misconfiguration"
0 commit comments