qdrant / qdrant/vector-db-benchmark
OpenSearch search run should handle rate-limiting / 429 HTTP errors
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 371
- Forks
- 155
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 4
Description
Ideally we should handle it and retry/fallback.
Sample error at query time:
6038it [01:17, 77.75it/s]
Experiment opensearch-m-16-ef-128 - glove-100-angular interrupted
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/root/vector-db-benchmark/engine/base_client/search.py", line 46, in _search_one
search_res = cls.search_one(query, top)
File "/root/vector-db-benchmark/engine/clients/opensearch/search.py", line 52, in search_one
res = cls.client.search(
File "/usr/local/lib/python3.8/dist-packages/opensearchpy/client/utils.py", line 181, in _wrapped
return func(*args, params=params, headers=headers, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/opensearchpy/client/__init__.py", line 1742, in search
return self.transport.perform_request(
File "/usr/local/lib/python3.8/dist-packages/opensearchpy/transport.py", line 448, in perform_request
raise e
File "/usr/local/lib/python3.8/dist-packages/opensearchpy/transport.py", line 409, in perform_request
status, headers_response, data = connection.perform_request(
File "/usr/local/lib/python3.8/dist-packages/opensearchpy/connection/http_urllib3.py", line 290, in perform_request
self._raise_error(
File "/usr/local/lib/python3.8/dist-packages/opensearchpy/connection/base.py", line 316, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
opensearchpy.exceptions.TransportError: TransportError(429, '429 Too Many Requests /bench/_search')
"""
Sample error at ingestion
opensearchpy.exceptions.TransportError: TransportError(429, '429 Too Many Requests /bench/_bulk')
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/root/vector-db-benchmark/engine/base_client/upload.py", line 89, in _upload_batch
cls.upload_batch(batch)
File "/root/vector-db-benchmark/engine/clients/opensearch/upload.py", line 43, in upload_batch
cls.client.bulk(
File "/usr/local/lib/python3.10/dist-packages/opensearchpy/client/utils.py", line 181, in _wrapped
return func(*args, params=params, headers=headers, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/opensearchpy/client/__init__.py", line 462, in bulk
return self.transport.perform_request(
File "/usr/local/lib/python3.10/dist-packages/opensearchpy/transport.py", line 448, in perform_request
raise e
File "/usr/local/lib/python3.10/dist-packages/opensearchpy/transport.py", line 409, in perform_request
status, headers_response, data = connection.perform_request(
File "/usr/local/lib/python3.10/dist-packages/opensearchpy/connection/http_urllib3.py", line 290, in perform_request
self._raise_error(
File "/usr/local/lib/python3.10/dist-packages/opensearchpy/connection/base.py", line 316, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
opensearchpy.exceptions.TransportError: TransportError(429, '429 Too Many Requests /bench/_bulk')
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/vector-db-benchmark/run.py", line 91, in <module>
app()
File "/root/vector-db-benchmark/run.py", line 86, in run
raise e
File "/root/vector-db-benchmark/run.py", line 59, in run
client.run_experiment(
File "/root/vector-db-benchmark/engine/base_client/client.py", line 108, in run_experiment
upload_stats = self.uploader.upload(
File "/root/vector-db-benchmark/engine/base_client/upload.py", line 56, in upload
latencies = list(
File "/usr/lib/python3.10/multiprocessing/pool.py", line 873, in next
raise value
opensearchpy.exceptions.TransportError: TransportError(429, '429 Too Many Requests /bench/_bulk')
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with engine/clients/opensearch/search.py and engine/clients/opensearch/upload.py, then trace their callers in engine/base_client/search.py and engine/base_client/upload.py. Reproduce the 429 behavior for both _search_one and _upload_batch and determine the intended retry or fallback policy. Done means rate-limited search and bulk ingestion no longer abort the benchmark unexpectedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100