Giter VIP home page Giter VIP logo

aioelasticsearch's People

Contributors

asvetlov avatar dependabot[bot] avatar elysium31 avatar froosty avatar hellysmile avatar hzlmn avatar lightme16 avatar litwisha avatar paulefoe avatar pgtuk avatar pyup-bot avatar roganov avatar tpashkevych-exos avatar vangheem avatar webknjaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aioelasticsearch's Issues

Frequent timeout errors

I am using this library in a concurrent environment but I frequently get timeout errors when there shouldn't be any.

I am instantiating the Elasticsearch object with maxsize=200 since it could be called by around 200 coroutines at any given time. The default value for the timeout is 10 seconds and should be plenty, but I increased it to 30 seconds and even if the timeouts diminish in frequency I still get a lot of them.

Don't suppress nested exception on raising TimeoutError

Information about what internal IO operation was interrupted by timeout expiring is important in some cases, it allows to figure out what exact IO takes too long time.

raise TimeoutError from None should be replaced with raise TimeoutError from exc

Slower than sync es

Hi,
from what i've testet this async es client is way slower than the sync version. So, did i make a mistake or is this behaviour expected?

Kind regrads

Drop kwargs sink from pools

Now AIOHttpConnectionPool accepts and silently ignores all unknown parameters.
It leads to mysterious bugs when type spelling in argument name doesn't raise an exception.

Infinite loop when max_retries=0

If 'max_retries=0' is set and the request fails, the client goes into an infinite loop, resulting in a ddos elasticsearch.

In the synchronous version of the client, this case is handled correctly.

Unknown AIOHttpConnection type errors

In my app which uses aioelasticsearch, I sometimes get these errors but I can’t figure out if there is something wrong with my app or the lib. Specifically, how do I interpret what is causing it / what it means?

python:   File "/home/sml/virtualenvs/cr-api-web/lib/python3.6/site-packages/aioelasticsearch/transport.py", line 338, in perform_request
python:     ignore=ignore, timeout=timeout, headers=headers,
python:   File "/home/sml/virtualenvs/cr-api-web/lib/python3.6/site-packages/aioelasticsearch/transport.py", line 252, in _perform_request
python:     connection = await self.get_connection()
python:   File "/home/sml/virtualenvs/cr-api-web/lib/python3.6/site-packages/aioelasticsearch/transport.py", line 236, in get_connection
python:     return self.connection_pool.get_connection()
python:   File "/home/sml/virtualenvs/cr-api-web/lib/python3.6/site-packages/aioelasticsearch/pool.py", line 96, in get_connection
python:     self.resurrect()
python:   File "/home/sml/virtualenvs/cr-api-web/lib/python3.6/site-packages/aioelasticsearch/pool.py", line 82, in resurrect
python:     self.dead.put_nowait((timestamp, connection))
python:   File "/usr/lib/python3.6/asyncio/queues.py", line 150, in put_nowait
python:     self._put(item)
python:   File "/usr/lib/python3.6/asyncio/queues.py", line 231, in _put
python:     heappush(self._queue, item)
python: TypeError: '<' not supported between instances of 'AIOHttpConnection' and 'AIOHttpConnection'

release 0.5.2 uses lagacy StrictVersion that doesn't complaint with pep-0440

0.5.2 is the only release that require elasticsearch>=6

File "...../lib/python3.9/site-packages/aioelasticsearch/connection.py", line 61, in init
if StrictVersion(aiohttp.version).version < (3, 0):
File "/usr/lib/python3.9/distutils/version.py", line 40, in init
self.parse(vstring)
File "/usr/lib/python3.9/distutils/version.py", line 137, in parse
raise ValueError("invalid version number '%s'" % vstring)
ValueError: invalid version number '3.7.4.post0'

AIOHttpConnection init raises AttributeError on use_ssl with Elasticsearch>2.0.0

aioelasticsearch==0.5.2
elasticsearch==2.4.1

AIOHttpConnection takes use_ssl argument and passes one to the parent's __init__.

Then self.use_ssl gets used instead of use_ssl here
https://github.com/aio-libs/aioelasticsearch/blob/master/aioelasticsearch/connection.py#L52

It works for the latest elasticsearch-py versions, however, it doesn't work with >2.0.0, b/c there's no self.use_ssl = use_ssl there.

The fix is straightforward - use use_ssl directly instead of self.use_ssl.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.