-
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
[Preview] Change Feed Processor: Refactors manual checkpoint API #2488
Conversation
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.
Please follow the required format: "[Internal] Category: (Adds|Fixes|Refactors|Removes) Description"
Internal should be used for PRs that have no customer impact. This flag is used to help generate the changelog to know which PRs should be included. Examples:
Diagnostics: Adds GetElapsedClientLatency to CosmosDiagnostics
PartitionKey: Fixes null reference when using default(PartitionKey)
[v4] Client Encryption: Refactors code to external project
[Internal] Query: Adds code generator for CosmosNumbers for easy additions in the future.
…ure/azure-cosmos-dotnet-v3 into users/ealsur/checkpointreview
…ure/azure-cosmos-dotnet-v3 into users/ealsur/checkpointreview
…ure/azure-cosmos-dotnet-v3 into users/ealsur/checkpointreview
@kirankumarkolli and @FabianMeiswinkel please take a look at the API changes |
Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Observers/ChangeFeedObserverContextCore.cs
Outdated
Show resolved
Hide resolved
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.
LGTM except for NITs where try/catch could be removed completely
Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Observers/ChangeFeedObserverContextCore.cs
Show resolved
Hide resolved
@@ -1526,31 +1521,26 @@ public abstract class Container | |||
/// </summary> | |||
/// <param name="context">The context related to the changes.</param> | |||
/// <param name="changes">The changes that happened.</param> |
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.
Should this be something a little more obvious like changesPayload
?
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.
Well, in this case, it is actually the list (IReadOnlyCollection<T>
) of changes that happened. Those changes in the collection could be inserts or updates, but they are still changes. Not sure how the word payload
makes it more clear?
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.
Also, the current API that is GA uses changes
as name, so I rather keep the same as we have no feedback that indicates the name brings confusion?
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.
Then it's fine. It just seemed a little off that a stream would be called changes.
Based on the feedback on #2331 on the preview API, it would be better for the Manual Checkpoint API to be slightly refactored.
Current API is:
Proposed API:
The change is on the checkpoint delegate.
The reasoning behind the change is that
Task
already exposes an exception if it fails. So theTry
signature returning abool
andException
is ambiguous because theTask
itself could also capture an exception.