Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request fixes bug #40157 by addressing issues in how batched document indexing calls handle error mapping and timeouts across different modules. The key changes include removing the error_map parameter in some batched method calls and explicitly adding a timeout parameter for proper timeout handling.
- Updates to asynchronous indexing in _search_indexing_buffered_sender_async.py to use timeout instead of error_map.
- Synchronous indexing changes in _search_indexing_buffered_sender.py and _search_client.py to adjust error_map usage and timeout handling.
- Changelog updated to reflect the bug fix.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| sdk/search/azure-search-documents/azure/search/documents/aio/_search_indexing_buffered_sender_async.py | Removed error_map parameter and added timeout in the async indexing calls |
| sdk/search/azure-search-documents/azure/search/documents/_search_indexing_buffered_sender.py | Removed error_map parameter from the synchronous batching calls |
| sdk/search/azure-search-documents/azure/search/documents/_search_client.py | Added error_map in one call and removed it in another, impacting consistency |
| sdk/search/azure-search-documents/CHANGELOG.md | Updated changelog to document the bug fix |
Comments suppressed due to low confidence (4)
sdk/search/azure-search-documents/azure/search/documents/aio/_search_indexing_buffered_sender_async.py:302
- The removal of the error_map parameter in favor of adding a timeout might lead to loss of error mapping information in the async indexing call. Verify that error mapping is handled elsewhere if this change is intentional.
actions=actions[:pos], timeout=remaining, **kwargs
sdk/search/azure-search-documents/azure/search/documents/aio/_search_indexing_buffered_sender_async.py:313
- Similar to the previous call, removing error_map here might affect error handling consistency in the async batch process. Please confirm if error mapping is being handled by another mechanism.
actions=actions[pos:], timeout=remaining, **kwargs
sdk/search/azure-search-documents/azure/search/documents/_search_indexing_buffered_sender.py:299
- The synchronous indexing method now omits error_map, which may be critical for mapping errors during batching. Consider verifying that removing error_map does not impact error handling logic.
actions=actions[:pos], timeout=remaining, **kwargs
sdk/search/azure-search-documents/azure/search/documents/_search_client.py:721
- Inconsistent handling of the error_map parameter is observed; the first indexing call passes error_map while the second does not. Reassess the error mapping logic to ensure consistent behavior.
actions=actions[pos:], **kwargs
To close #40157