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 23101f5 commit 9b22349Copy full SHA for 9b22349
src/storage/s3.rs
@@ -206,6 +206,15 @@ impl S3Backend {
206
207
let etag = if let Some(mut etag) = res.e_tag {
208
if let Some(range) = range {
209
+ // we can generate a strong, unique etag for a range of the remote object too,
210
+ // by just concatenating the original etag with the range start and end.
211
+ //
212
+ // About edge cases:
213
+ // When the etag of the full archive changes after a rebuild,
214
+ // all derived etags for files inside the archive will also change.
215
216
+ // This could lead to _changed_ ETags, where the single file inside the archive
217
+ // is actually the same.
218
etag = format!("\"{}:{}-{}\"", etag, range.start(), range.end())
219
}
220
match etag.parse::<headers::ETag>() {
0 commit comments