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

Pinging elasticsearch before index #13

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Pinging elasticsearch before index #13

wants to merge 4 commits into from

Conversation

ahmetcetin
Copy link

Pinging elasticsearch before index not to crash

@moooji
Copy link
Collaborator

moooji commented Feb 28, 2017

Thx for the PR!

The issue that I see is that this PR will swallow potential write errors :-o and simply console log them. IMHO errors should be thrown/returned so that the application can handle them properly.

Ideally, we would like to retry the write when the cluster was temporarily down.

Also, it seems unnecessary to ping before write, since if the cluster is down, write will return an error exactly like ping does. I cannot see the benefit of the added ping, but maybe I am missing something here.

Can you maybe explain your scenario / use case a bit more?

@gfogle
Copy link

gfogle commented Jun 17, 2017

this could be potentially useful for say container-based environments where i may want to do a health check prior to marking something g2g.

for instance if im doing container rotations i want to make sure that something that was configured isnt broken after ive taken prior, healthy containers down.

sending hello parameter in ping method causes es to return 400 in version 5, so removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants