Skip to content

Commit

Permalink
Update azure SDK to 0.18 and use open range support (#6103)
Browse files Browse the repository at this point in the history
* Update `azure-*` crates to 0.18
* Use new open ranges support added by upstream in
Azure/azure-sdk-for-rust#1482

Part of #5567. Prior update PR: #6081
  • Loading branch information
arpad-m committed Dec 12, 2023
1 parent 5820faa commit 7c2c87a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 27 deletions.
42 changes: 29 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ license = "Apache-2.0"
anyhow = { version = "1.0", features = ["backtrace"] }
arc-swap = "1.6"
async-compression = { version = "0.4.0", features = ["tokio", "gzip", "zstd"] }
azure_core = "0.17"
azure_identity = "0.17"
azure_storage = "0.17"
azure_storage_blobs = "0.17"
azure_core = "0.18"
azure_identity = "0.18"
azure_storage = "0.18"
azure_storage_blobs = "0.18"
flate2 = "1.0.26"
async-stream = "0.3"
async-trait = "0.1"
Expand Down
15 changes: 5 additions & 10 deletions libs/remote_storage/src/azure_blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,17 +271,12 @@ impl RemoteStorage for AzureBlobStorage {

let mut builder = blob_client.get();

if let Some(end_exclusive) = end_exclusive {
builder = builder.range(Range::new(start_inclusive, end_exclusive));
let range: Range = if let Some(end_exclusive) = end_exclusive {
(start_inclusive..end_exclusive).into()
} else {
// Open ranges are not supported by the SDK so we work around
// by setting the upper limit extremely high (but high enough
// to still be representable by signed 64 bit integers).
// TODO remove workaround once the SDK adds open range support
// https://github.com/Azure/azure-sdk-for-rust/issues/1438
let end_exclusive = u64::MAX / 4;
builder = builder.range(Range::new(start_inclusive, end_exclusive));
}
(start_inclusive..).into()
};
builder = builder.range(range);

self.download_for_builder(builder).await
}
Expand Down

1 comment on commit 7c2c87a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2252 tests run: 2160 passed, 0 failed, 92 skipped (full report)


Flaky tests (2)

Postgres 16

  • test_crafted_wal_end[last_wal_record_crossing_segment]: debug
  • test_pitr_gc: debug

Code coverage (full report)

  • functions: 55.2% (9428 of 17085 functions)
  • lines: 82.3% (54596 of 66344 lines)

The comment gets automatically updated with the latest test results
7c2c87a at 2023-12-12T18:14:00.804Z :recycle:

Please sign in to comment.