when retryable error happens, cosmos client returns empty result for pagination query #35021
Labels
Client
This issue points to a problem in the data-plane of the library.
Cosmos
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
Describe the bug
the very first pagination query, means no continuation token, returns no result if a retryable error happens
specifically, if https://github.com/Azure/azure-sdk-for-python/blob/azure-cosmos_4.5.2b5/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/base_execution_context.py#L127 throws exception,
_has_started
, which is set toTrue
already, won't be revert back to the original value, thus when retry calling into_fetch_items_helper_no_retries
, it will skip thewhile
loop if there is continuation token, and returns 0 result.we have verified, if we try catch https://github.com/Azure/azure-sdk-for-python/blob/azure-cosmos_4.5.2b5/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/base_execution_context.py#L127 and revert
_has_started
back to the original value, then the issue is resolved.To Reproduce
Steps to reproduce the behavior:
QueryItems
query with expected non empty result concurrentlyExpected behavior
A clear and concise description of what you expected to happen.
the query should either fail or return correct result
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: