We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44928d8 commit 8368524Copy full SHA for 8368524
src/storage/s3.rs
@@ -212,6 +212,15 @@ impl S3Backend {
212
213
let etag = if let Some(mut etag) = res.e_tag {
214
if let Some(range) = range {
215
+ // we can generate a strong, unique etag for a range of the remote object too,
216
+ // by just concatenating the original etag with the range start and end.
217
+ //
218
+ // About edge cases:
219
+ // When the etag of the full archive changes after a rebuild,
220
+ // all derived etags for files inside the archive will also change.
221
222
+ // This could lead to _changed_ ETags, where the single file inside the archive
223
+ // is actually the same.
224
etag = format!("\"{}:{}-{}\"", etag, range.start(), range.end())
225
}
226
match etag.parse::<headers::ETag>() {
0 commit comments