-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Implement continuation token size limit #30600
Conversation
this adds continuation token size limit tot he python sdk. The new option for item queries accepts an integer value greater than 1 and is represented in terms of KB, ie 2 is 2kb or 2048 Bytes.
API change check APIView has identified API level changes in this PR and created following API reviews. |
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.
Couple small comments here and there, implementation looks good overall though.
Also missing an update to the Changelog and the addition of samples to show users how the option can be used. Please add those and ask for another review, thanks!
added samples for using the new feature of limiting continuation token size.
Seems like the pipelines are complaining but otherwise LGTM! Let's try to get other reviews so we can release this after the next stable release. |
This should prevent CSpell error for necessary string literal.
Ignore line too long
Added provisional for the new keyword we are adding with this feature.
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.
There are no tests for this feature.
@bambriz - for every feature we add, we should aim to add tests to make sure we test it and catch future regressions.
For now this test verifies that the continuation token limit size was passed in the request headers.
Co-authored-by: Kushagra Thapar <[email protected]>
Description
This PR adds continuation token size limit support to the python sdk. The new option for item queries accepts a non-negative integer value and is represented in terms of KB, ie 2 is 2kb or 2048 Bytes. This PR fixes issue #27625
sample:
query_iterable = container.query_items(query="SELECT * FROM c where c.some_field = 'some_value'", max_item_count=max_count, partition_key=Some_Partition_Key, response_continuation_token_limit_in_kb=8)
This query will limit the continuation token size to 8KB.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines