algolia / algolia/algoliasearch-client-python
Update AlgoliaUnreachableHostException to OperationTimeout
- Vorherrschende Sprache
- Python
- Sterne
- 207
- Forks
- 63
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
- 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.
Beitragsleitfaden
Rechercherichtung
Beginne damit, die Timeout-Behandlung für replace_all_objects im Python-Client nachzuverfolgen und zu untersuchen, wie sie Fehler auf AlgoliaUnreachableHostException abbildet. Reproduziere den Vorgang mit einem ausreichend großen Index und überprüfe anschließend, dass ein Read-Timeout OperationTimeout meldet, während tatsächlich nicht erreichbare Hosts weiterhin die Host-Ausnahme melden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100