-
Notifications
You must be signed in to change notification settings - Fork 494
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
Change Feed Estimator: Adds support for detailed estimation per lease in PREVIEW #1830
Merged
Conversation
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
…/Azure/azure-cosmos-dotnet-v3 into users/ealsur/estimatorleasespull
Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedEstimatorRunner.cs
Show resolved
Hide resolved
FabianMeiswinkel
previously approved these changes
Sep 3, 2020
ealsur
changed the title
Change Feed Estimator: Adds support for detailed estimation per lease
Change Feed Estimator: Adds support for detailed estimation per lease in PREVIEW
Sep 4, 2020
j82w
reviewed
Sep 4, 2020
Microsoft.Azure.Cosmos/src/Resource/Container/ContainerInlineCore.cs
Outdated
Show resolved
Hide resolved
…/Azure/azure-cosmos-dotnet-v3 into users/ealsur/estimatorleasespull
Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedEstimator.cs
Outdated
Show resolved
Hide resolved
kirankumarkolli
approved these changes
Sep 30, 2020
1 task
1 task
Closing due to in-activity, pease feel free to re-open. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new public API to obtain the detailed estimation per Lease on demand.
This API produces an iterator that returns pages of estimations. The iterator can have a customizable page size that will limit the number of estimations done at any given time. By default, it will estimate all leases on a single page.
In the
Container
, we have:And the
ChangeFeedEstimator
:Where the
ChangeFeedEstimatorRequestOptions
gives an option to set theMaxItemCount
:Each page will contain a list of
ChangeFeedProcessorState
:Where the
LeaseToken
represents the identifier for that lease, theEstimatedLag
is the estimation, andInstanceName
is the name of the Change Feed processor instance processing that lease.How can a user consume it
Code refactorings
The PR also refactors part of the CFP code. Originally there was code shared between the Processor, and the Estimator (when the Estimator was only a push model). Code refactoring had to be done to include the Estimator pull model and also maintain the Estimator push model (push now uses pull internally)
Also included some Code Analysis fixes on modified files plus new tests all around (emulator and unit tests).
Type of change
Closing issues
Closes #1730