-
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
[Internal] Samples: Adds samples for Container.IsFeedRangePartOfAsync #4782
base: master
Are you sure you want to change the base?
[Internal] Samples: Adds samples for Container.IsFeedRangePartOfAsync #4782
Conversation
…add_starting_simple_samples
// specific value, then the second range should be part of the first. | ||
await Program.GivenContainerWithPartitionKeyExists_WhenFeedRangesAreCompared_ThenResultShouldBeAsExpected( | ||
database: database, | ||
x: FeedRange.FromJsonString(toStringValue: "{\"Range\":{\"min\":\"\",\"max\":\"FFFFFFFFFFFFFFFF\"}}"), |
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.
In ideal use-case application will not set random FeedRange but gets it from one of the client APIs.
So idea is to have a scenario E2E such that the FeedRange is read from client API and then feed into IsFeedRangePartOfAsync API
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.
In ideal use-case application will not set random FeedRange but gets it from one of the client APIs.
So idea is to have a scenario E2E such that the FeedRange is read from client API and then feed into
IsFeedRangePartOfAsync API
@kirankumarkolli I disagree. I would have to set up a sample that mimics how a specific customer wants to use this. I am showcasing the new capability, not trying to reproduce every variation someone wants to use it.
Ex. Create a ChangeFeedProcessor, read FeedRange from the ChangeFeedContext, read FeedRanges (bookmarks) from another Container and validate using IsFeedRangePartOfAsync. This is too much for a sample that is supposed to be agnostic and totally disconnected from one customer's use case scenario.
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.
new direction for sample.
…add_starting_simple_samples
…add_starting_simple_samples
…add_starting_simple_samples
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.
58d6e4c
@philipthomas-MSFT please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
1 similar comment
@philipthomas-MSFT please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Pull Request Template
Description
Description:
This PR adds a sample for the
IsFeedRangePartOfAsync
method on theContainer
class. The purpose of this sample is to demonstrate how to efficiently check whether one feed range is part of another within a Cosmos DB container. This method is crucial for scenarios that involve partitioned data, where comparisons between feed ranges are necessary for tasks such as incremental data migration, parallelization, or distributed queries.The sample illustrates:
IsFeedRangePartOfAsync
to compare two feed ranges (x
andy
) and determine if one is part of the other.By providing this sample, developers can better understand how to leverage feed ranges when working with Cosmos DB, leading to more efficient data processing and partition management.
#4566
Type of change
Please delete options that are not relevant.
Closing issues
To automatically close an issue: closes #IssueNumber