algolia / algolia/algoliasearch-client-python
retryable error doesn't increment connection timeout number
- Langage dominant
- Python
- Étoiles
- 207
- Forks
- 63
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez dans algoliasearch/http/transporter.py, à la ligne indiquée, et examinez les spécifications de retry concernant le comportement du timeout, en utilisant l’implémentation C# comme référence. Ajoutez un test couvrant l’augmentation du timeout en fonction du nombre de retries, et considérez le travail comme terminé lorsque le timeout de connexion réessayable augmente comme spécifié et que le test réussit.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- api, search
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 50/100