algolia / algolia/algoliasearch-client-python
retryable error doesn't increment connection timeout number
- 主要语言
- Python
- 星标
- 207
- 派生
- 63
- PR 合并指标
- 30 天内没有已合并 PR
描述
Looking at the retry specs, we see that:
```
When retrying, use the next host in your array.
When retrying because of a timeout, raise the timeouts like this:
number_of_tries * base_timeout
Example: Search (5s timeout) → Search timeout → Search (10s timeout) → Repeat.
```
At the moment, on the Python API Client we don't use yet the `retry_count` for this.
**Goal**:
1. Multiple timeouts by the number of tries on the line https://github.com/algolia/algoliasearch-client-python/blob/97a6f15542f6a8951cdbcd0d2881a744ec24e329/algoliasearch/http/transporter.py#L72.
2. Add a test on it.
Implementation on C#: https://github.com/algolia/algoliasearch-client-csharp/blob/42ab1842f859df87482602b12d5cb714bfa8ec71/src/Algolia.Search/Transport/HttpTransport.cs#L118
贡献指南
调研方向
从 algoliasearch/http/transporter.py 中链接的那一行开始,参考 C# 实现,检查有关超时行为的重试规范。添加一个覆盖超时随重试次数增长的测试,并在可重试的连接超时按指定方式增加且测试通过时,认为工作已完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- api, search
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 50/100