-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Preview] PriorityBasedExecution: Adds PriorityLevel as a RequestOpti…
…on (#3672) * Added Priority Level as a Request Option * Changed Priority Level Low and High to 1 and 2 respectively * Bumped DirectVersion * Added made PriorityLevel internal for non preview packages * Deleted PriorityLevelTests.cs * Added description of Priority Level in RequestOptions.cs * Modified comments for PriorityLevel in RequestOptions.cs * Updated Contracts * Modified Remarks for PriorityLevel and added see also link. * Updated contracts --------- Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
- Loading branch information
1 parent
4ab6293
commit d822239
Showing
4 changed files
with
117 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
Microsoft.Azure.Cosmos/src/Resource/Settings/PriorityLevel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
//------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
//------------------------------------------------------------ | ||
|
||
namespace Microsoft.Azure.Cosmos | ||
{ | ||
/// <summary> | ||
/// Valid values of Priority Level for a request | ||
/// </summary> | ||
/// <remarks> | ||
/// Setting priority level only has an effect if Priority Based Execution is enabled. | ||
/// If it is not enabled, the priority level is ignored by the backend. | ||
/// Default PriorityLevel for each request is treated as High. It can be explicitly set to Low for some requests. | ||
/// When Priority based execution is enabled, if there are more requests than the configured RU/S in a second, | ||
/// then Cosmos DB will throttle low priority requests to allow high priority requests to execute. | ||
/// This does not limit the throughput available to each priority level. Each priority level can consume the complete | ||
/// provisioned throughput in absence of the other. If both priorities are present and the user goes above the | ||
/// configured RU/s, low priority requests start getting throttled first to allow execution of mission critical workloads. | ||
/// </remarks> | ||
/// <seealso href="https://aka.ms/CosmosDB/PriorityBasedExecution"/> | ||
|
||
#if PREVIEW | ||
public | ||
#else | ||
internal | ||
#endif | ||
enum PriorityLevel | ||
{ | ||
/// <summary> | ||
/// High Priority | ||
/// </summary> | ||
High = 1, | ||
|
||
/// <summary> | ||
/// Low Priority | ||
/// </summary> | ||
Low = 2, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters