-
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
[Cosmos] make response_hook thread safe for the sync client #33790
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
API change check APIView has identified API level changes in this PR and created following API reviews. |
simorenoh
changed the title
[Cosmos] make response_hook thread safe
[Cosmos] make response_hook thread safe sync client
Jan 15, 2024
simorenoh
changed the title
[Cosmos] make response_hook thread safe sync client
[Cosmos] make response_hook thread safe for the sync client
Jan 15, 2024
This reverts commit cacf629.
simorenoh
requested review from
kushagraThapar,
xinlian12,
annatisch and
bambriz
as code owners
January 17, 2024 16:11
annatisch
reviewed
Jan 17, 2024
sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py
Outdated
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py
Outdated
Show resolved
Hide resolved
annatisch
reviewed
Jan 23, 2024
annatisch
approved these changes
Jan 25, 2024
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.
Awesome thank you!
sofiar-msft
pushed a commit
to sofiar-msft/azure-sdk-for-python
that referenced
this pull request
Feb 16, 2024
) * only missing queries * pylint * upsert method typehints * Update _cosmos_client_connection.py * had to include List in return type for batch * Revert "had to include List in return type for batch" This reverts commit cacf629. * read all items is also query - still don't have this logic down * casting batch * casting again? * oops * return readItems to previous state * remove casting in client_connection Batch * update __queryFeed to be thread safe * forgot to save headers * Update _cosmos_client_connection.py * typehint for non-used method was missing * Updated User operations * make response_hook internal in cosmos_client * make response_hook internal in database * make response_hook internal container * small fixes * Update database.py * Update _cosmos_client_connection.py * fixes from comments * wrong naming on these samples pls let me squeeze it in <3 * revert changes on cosmos_client methods * Update cosmos_client.py --------- Co-authored-by: antisch <[email protected]>
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.
This PR ensures that the use of
response_hook
by users is utilizing thread-safe headers as opposed toclient_connection.last_response_headers
for the sync client.