You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like pool_maxsize to work for AsyncOpenSearch, e.g. by also setting maxsize internally.
What alternatives have you considered?
Right now, I instantiate OpenSearch/AsyncOpenSearch clients with both pool_maxsize and maxsize set to ensure consistent settings, but its undesired from a DevEx perspective to have to use one or the other when moving between sync and async.
Do you have any additional context?
Debugger can show self._limit set to 10 (the default) if pool_maxsize is set when creating a new instance of AsyncOpenSearch. The value can be changed only if maxsize is passed instead to AsyncOpenSearch.
Thanks for reporting this, please do contribute a fix. Generally I'd want a lot of the setup code to be refactored so that we don't have differences between sync/async for anything that can be set in both.
Is your feature request related to a problem?
When using
OpenSearch
client, settingpool_maxsize
allows you to increase the connection pool size as shown in the documentation guides.The same is not true when using
AsyncOpenSearch
and it seemspool_maxsize
does not have the desired effect.The argument has to be named
maxsize
for it to work and take effect as shown inopensearch-py/opensearchpy/connection/http_async.py
Line 49 in d54aab4
What solution would you like?
I would like
pool_maxsize
to work forAsyncOpenSearch
, e.g. by also settingmaxsize
internally.What alternatives have you considered?
Right now, I instantiate OpenSearch/AsyncOpenSearch clients with both
pool_maxsize
andmaxsize
set to ensure consistent settings, but its undesired from a DevEx perspective to have to use one or the other when moving between sync and async.Do you have any additional context?
Debugger can show
self._limit
set to10
(the default) ifpool_maxsize
is set when creating a new instance ofAsyncOpenSearch
. The value can be changed only ifmaxsize
is passed instead toAsyncOpenSearch
.opensearch-py/opensearchpy/connection/http_async.py
Lines 284 to 286 in d54aab4
The text was updated successfully, but these errors were encountered: