-
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.
Routing: Adds Parallel Request Hedging (#4198)
* initial commit * fix * document client restore * document client changes * clientContextCore fix * global endpoint manager fix * pre test changes * start of tests * added dispose for cancellation token source * test changes * working test * more testing * removed unneeded changes * revert changes to global endpoint manager (unneeded) * requested changes * requested changes * moves logic into availability strategy * adds disableStrategy type * fixed test * refactor should hedge * refactor should hedge/adds can use availability strat * fixed mocking test * Update Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs Co-authored-by: Matias Quaranta <[email protected]> * requested changes * fix enabled * added preview flag * fixed XML * fixed preview flags * fixed bugs * nit * changed preview flags + update contracts * revert file for whitespace * changed file back after update contract * removed using * requested changes * fixed small bug * fixed bug * removed options from client builder * removed usings * constructor check * fixed test * added exclude region to logs * lazy task create * rename + lazy * improvements and fixes * Added XML commentes * fixed xml comments * small tweeks * added fixes + tests * added item check to tests * changed test regions to match with CI accounts * query test * update test for multiregion CI pipelines * enviroment var null check * null checks * perf tests * revert benchmark project * possible memory saving * Tests/improvements * extensive testing improvements + bug fixes * removed unneeded changes * nits * fix hedge regions * update contracts * fix updatecontract * test fix * fixed areequal asserts * ALTERNATE METHOD * added readfeed FI operation type to tests * requested changes and improvemtns * list optimization * fixed edge case diagnostics * small fix * small fixes * refactor code * fixed null issues * null refrence * bug fixes * changed header clone to internal * fixed API doc + test change * removed unused method * changed to internal * fixed internal * removed contract changes * updated abstract class * suggested changes * small bug fixes/improvements * nits and fixes * removed unused method * test fix + applicable region fix + error handeling * fixed test * fixed test * location cache change * requested changes * fixed test * nits * headers change * Update Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs Co-authored-by: Matias Quaranta <[email protected]> * simplifed method * nit * fixed change * remove linq * fixed faulty change * reverted accidental test change * removed tooManyRequests test - unlrelated bug * removed tooManyRequests test - unlrelated bug --------- Co-authored-by: Matias Quaranta <[email protected]>
- Loading branch information
1 parent
b478595
commit 3fd2ce6
Showing
16 changed files
with
1,547 additions
and
44 deletions.
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
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
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
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
32 changes: 32 additions & 0 deletions
32
Microsoft.Azure.Cosmos/src/Routing/AvailabilityStrategy/AvailabilityStrategy.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,32 @@ | ||
//------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
//------------------------------------------------------------ | ||
namespace Microsoft.Azure.Cosmos | ||
{ | ||
using System; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Microsoft.Azure.Cosmos.Handlers; | ||
|
||
/// <summary> | ||
/// Types of availability strategies supported | ||
/// </summary> | ||
internal abstract class AvailabilityStrategy | ||
{ | ||
/// <summary> | ||
/// Execute the availability strategy | ||
/// </summary> | ||
/// <param name="sender"></param> | ||
/// <param name="client"></param> | ||
/// <param name="requestMessage"></param> | ||
/// <param name="cancellationToken"></param> | ||
/// <returns>The response from the service after the availability strategy is executed</returns> | ||
public abstract Task<ResponseMessage> ExecuteAvailabilityStrategyAsync( | ||
Func<RequestMessage, CancellationToken, Task<ResponseMessage>> sender, | ||
CosmosClient client, | ||
RequestMessage requestMessage, | ||
CancellationToken cancellationToken); | ||
|
||
internal abstract bool Enabled(); | ||
} | ||
} |
Oops, something went wrong.