-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Updated Default Concurrency count #54428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/storage/stg101base
Are you sure you want to change the base?
Changes from all commits
837e65c
449d18e
374bc66
330d533
14889a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.ComponentModel; | ||
|
|
||
| namespace Azure.Storage | ||
| { | ||
|
|
@@ -129,6 +130,9 @@ internal static class Constants | |
| public const string DisableExpectContinueHeaderSwitchName = "Azure.Storage.DisableExpectContinueHeader"; | ||
| public const string DisableExpectContinueHeaderEnvVar = "AZURE_STORAGE_DISABLE_EXPECT_CONTINUE_HEADER"; | ||
|
|
||
| public const string UseLegacyDefaultConcurrencySwitchName = "Azure.Storage.UseLegacyDefaultConcurrency"; | ||
| public const string UseLegacyDefaultConcurrencyEnvVar = "AZURE_STORAGE_USE_LEGACY_DEFAULT_CONCURRENCY"; | ||
|
|
||
| public const string DefaultScope = "/.default"; | ||
|
|
||
| /// <summary> | ||
|
|
@@ -241,7 +245,9 @@ internal static class Append | |
|
|
||
| internal static class Block | ||
| { | ||
| public const int DefaultConcurrentTransfersCount = 5; | ||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public const int DefaultConcurrentTransfersCount = LegacyDefaultConcurrentTransfersCount; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I get that this is to avoid altering a ton of files but i think it's probably better for code health to do that. We don't want to be confused about whether we're using old or new values. We want to know it's legacy when we see it. I'd rather this const just not exist.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So Constants.DefaultConcurrentTransfersCount is no longer being referenced at all, we are replacing all usage with the new Constants.LegacyDefaultConcurrentTransfersCount. The reason why we hid it rather than removed it is to avoid a breaking change |
||
| public const int LegacyDefaultConcurrentTransfersCount = 5; | ||
| public const int DefaultInitalDownloadRangeSize = 256 * Constants.MB; // 256 MB | ||
| public const int Pre_2019_12_12_MaxUploadBytes = 256 * Constants.MB; // 256 MB | ||
| public const long MaxUploadBytes = 5000L * Constants.MB; // 5000MB | ||
|
|
@@ -378,7 +384,13 @@ internal static class DataLake | |
| /// <summary> | ||
| /// Default concurrent transfers count. | ||
| /// </summary> | ||
| public const int DefaultConcurrentTransfersCount = 5; | ||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public const int DefaultConcurrentTransfersCount = LegacyDefaultConcurrentTransfersCount; | ||
|
|
||
| /// <summary> | ||
| /// Legacy default concurrent transfers count. | ||
| /// </summary> | ||
| public const int LegacyDefaultConcurrentTransfersCount = 5; | ||
|
|
||
| /// <summary> | ||
| /// Max upload bytes for less than Service Version 2019-12-12. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentionally had to do this since Math.Clamp() is not supported for netstandard2.0 and earlier