From a4e8628f7edc62235497801bcdb64597b85250a4 Mon Sep 17 00:00:00 2001 From: Andrew Varnon Date: Wed, 11 Dec 2024 13:53:05 -0500 Subject: [PATCH] fixup! Use randomized content ID for Azure multipart uploads --- object_store/src/azure/mod.rs | 54 ++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/object_store/src/azure/mod.rs b/object_store/src/azure/mod.rs index 38a1ff87a7b..22b61702be3 100644 --- a/object_store/src/azure/mod.rs +++ b/object_store/src/azure/mod.rs @@ -414,16 +414,50 @@ mod tests { let mut multipart_upload_1 = integration.put_multipart(&path).await.unwrap(); let mut multipart_upload_2 = integration.put_multipart(&path).await.unwrap(); - for i in 0..5 { - multipart_upload_1 - .put_part(Bytes::from(format!("1:{},", i)).into()) - .await - .unwrap(); - multipart_upload_2 - .put_part(Bytes::from(format!("2:{},", i)).into()) - .await - .unwrap(); - } + multipart_upload_1 + .put_part(Bytes::from("1:0,").into()) + .await + .unwrap(); + multipart_upload_2 + .put_part(Bytes::from("2:0,").into()) + .await + .unwrap(); + + multipart_upload_2 + .put_part(Bytes::from("2:1,").into()) + .await + .unwrap(); + multipart_upload_1 + .put_part(Bytes::from("1:1,").into()) + .await + .unwrap(); + + multipart_upload_1 + .put_part(Bytes::from("1:2,").into()) + .await + .unwrap(); + multipart_upload_2 + .put_part(Bytes::from("2:2,").into()) + .await + .unwrap(); + + multipart_upload_2 + .put_part(Bytes::from("2:3,").into()) + .await + .unwrap(); + multipart_upload_1 + .put_part(Bytes::from("1:3,").into()) + .await + .unwrap(); + + multipart_upload_1 + .put_part(Bytes::from("1:4,").into()) + .await + .unwrap(); + multipart_upload_2 + .put_part(Bytes::from("2:4,").into()) + .await + .unwrap(); multipart_upload_1.complete().await.unwrap(); let err = multipart_upload_2.complete().await.unwrap_err();