algolia / algolia/algoliasearch-client-python
Update AlgoliaUnreachableHostException to OperationTimeout
- Ngôn ngữ chính
- Python
- Star
- 207
- Fork
- 63
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
- Algolia Client Version: 2.5.0 (I see that 3.0 was released 3 days ago, not sure if that resolves this)
- Language Version: Python 3.9.7
### Description
Client throws `algoliasearch.exceptions.AlgoliaUnreachableHostException`: Unreachable hosts during `replace_all_objects` operation. The issue was not that hosts were unreachable but that the operation was timing out. I fixed the problem by setting `readTimeout` to 100:
```
client = SearchClient.create(algolia_application_id, algolia_api_key)
index = client.init_index(algolia_index)
request_options = {
"readTimeout": 100
}
index.replace_all_objects(records, request_options)
```
A timeout should produce a timeout error. Unreachable is misleading.
### Steps To Reproduce
See description.
Use `replace_all_objects` on a sufficiently big index. Mine was 6393 rows and 10+ columns some with significant text blocks.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách theo dõi việc xử lý timeout cho replace_all_objects trong Python client và cách nó ánh xạ các lỗi thành AlgoliaUnreachableHostException. Tái hiện thao tác với một index đủ lớn, sau đó xác minh rằng timeout khi đọc báo cáo OperationTimeout, trong khi các host thực sự không thể truy cập vẫn báo cáo ngoại lệ host.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- api
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100