Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elasticsearch: don't json load doc id on failure #50

Open
wants to merge 2 commits into
base: master
from

Conversation

@foklepoint
Copy link
Contributor

@foklepoint foklepoint commented May 24, 2018

This addresses the issue where ES would be down and
not return a doc id, but we still attempted to read
the returned response even though the response code
was not valid

@foklepoint foklepoint requested review from dellis23 and spladug and removed request for spladug and dellis23 May 24, 2018
Saurabh Sharma
This addresses the issue where ES would be down and
not return a doc id, but we still attempted to read
the returned response even though the response code
was not valid
@foklepoint foklepoint force-pushed the failed-swallowed-exception branch from cdec7fe to 5d00e70 May 24, 2018
@foklepoint
Copy link
Contributor Author

@foklepoint foklepoint commented May 24, 2018

💇‍♂️

Copy link
Member

@spladug spladug left a comment

er, yeah, that makes more sense :P

Copy link
Member

@spladug spladug left a comment

whoops, yup

@rram
Copy link
Member

@rram rram commented May 24, 2018

My understanding of the issue is that Elasticsearch is hanging until a gateway timeout happens. This would fix the crash after the timeout but it'll still hang for a long time.

Saurabh Sharma
In cases where we can't load the deploy annotation id
(i.e when ES returns a bad response), we may refer to
this deploy_annotation_id, which will cause exceptions
if it isn't set. Previously it was being set in
elasticsearch.on_deploy_start
@foklepoint
Copy link
Contributor Author

@foklepoint foklepoint commented May 24, 2018

My understanding of the issue is that Elasticsearch is hanging until a gateway timeout happens. This would fix the crash after the timeout but it'll still hang for a long time.

This is indeed true :)

@foklepoint
Copy link
Contributor Author

@foklepoint foklepoint commented May 24, 2018

💇‍♂️ now we need to default deploy_annotation_id as None as well, otherwise on_build_sync fails

@foklepoint
Copy link
Contributor Author

@foklepoint foklepoint commented May 24, 2018

Couldn't find an easy way to adjust the timeout of reactor for ES :/

@spladug
Copy link
Member

@spladug spladug commented May 24, 2018

In our version of twisted the way to do a timeout is to do reactor.callLater(thetimeoutvalue) and then join on that deferred and the HTTP deferred at the same time. Whichever fires first is the winner. Cancel the other.

Copy link
Member

@spladug spladug left a comment

seems fine but timeouts would be nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.