Azure / azure-sdk-for-rust

This repository is for active development of the *unofficial* Azure SDK for Rust. This repository is *not* supported by the Azure SDK team.
MIT License
676 stars 231 forks source link

[Blob Storage] Default chunk size does not match value in doc header #1679

Open juliusl opened 2 weeks ago

juliusl commented 2 weeks ago

On this line https://github.com/Azure/azure-sdk-for-rust/blob/8c4caa251c3903d5eae848b41bb1d02a4d65231c/sdk/storage_blobs/src/clients/blob_client.rs#L51

The comment says,

    /// Stream a blob in chunks.
    ///
    /// By default, blobs are downloaded in 1MB chunks to reduce the impact of
    /// intermittent network issues while downloading large blobs.

However, if you look at the code, https://github.com/Azure/azure-sdk-for-rust/blob/8c4caa251c3903d5eae848b41bb1d02a4d65231c/sdk/storage_blobs/src/blob/operations/get_blob.rs#L8

const DEFAULT_CHUNK_SIZE: u64 = 0x1000 * 0x1000;

This value is actually 16 MiB -- (hover over w/ RA in vscode) const DEFAULT_CHUNK_SIZE: u64 = 16777216 (0x1000000)