Skip to content

Search fix 40157#41066

Merged
xiangyan99 merged 3 commits intomainfrom
search_fix_40157
May 13, 2025
Merged

Search fix 40157#41066
xiangyan99 merged 3 commits intomainfrom
search_fix_40157

Conversation

@xiangyan99
Copy link
Member

@xiangyan99 xiangyan99 commented May 13, 2025

To close #40157

@xiangyan99 xiangyan99 marked this pull request as ready for review May 13, 2025 19:00
@xiangyan99 xiangyan99 requested review from Copilot and pvaneck May 13, 2025 19:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@xiangyan99 xiangyan99 merged commit b9be54d into main May 13, 2025
24 checks passed
@xiangyan99 xiangyan99 deleted the search_fix_40157 branch May 13, 2025 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Batching in upload_documents() does not work

3 participants