-
Notifications
You must be signed in to change notification settings - Fork 497
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
Internal ChangeFeed: Adds adoption of pagination library #1933
Conversation
...e.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/ChangeFeedIteratorCoreTests.cs
Outdated
Show resolved
Hide resolved
...e.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/ChangeFeedIteratorCoreTests.cs
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.
Blocking on three things:
- The Emulator ContractTest change (see comment)
- The new behavior is throwing exceptions on 304, we don't throw exceptions on Not Modified currently. Why do are we doing it now? The previous behavior would simply return an empty page and HasMoreResults would be false, so the loop ended. What is the reasoning to add exceptions now?
- ChangeFeedOptions.EmitOldContinuationToken: What is the use case and what happens if the user leaves it enabled continuously?
|
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.
Synced offline. The migration test and format change to support previous customers was cleared up.
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosDiagnosticsTests.cs
Show resolved
Hide resolved
Closing due to in-activity, pease feel free to re-open. |
Internal ChangeFeed: Adds adoption of pagination library
Description
This PR adds the adoption of the new pagination library to ChangeFeed. This will enable us to have a single common code base for pagination across partitions, which has split proofing and the ability to simulate the service fabric emulator.
This is done by adding
CrossPartitionChangeFeedAsyncEnumerator
which implementsIAsyncEnumerator<TryCatch<ChangeFeedPage>>
.ChangeFeedIteratorCore
now is just a wrapper around this class to provide API compact with FeedIterator internal.While I was making this change I added a laundry list of improvements:
** This make the code exceptionless instead of throwing a newtonsoft exception
** Allows for continuation tokens to be composed
** Allows for continuation tokens to be serialized in binary
** This avoids having to serialize to a continuation token and rehydrating the iterator everytime this happens.
** Also allows the user to write a customer retry handler on 304s and also implement client side long poll if they want
The grammar for the cross partition change feed token is:
An example token is:
Fixes #1918