Skip to content

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.

3 participants