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

Throw an exception when an Elasticsearch bulk request fails #1157

Open
wants to merge 2 commits into
base: titan05
Choose a base branch
from
Open

Throw an exception when an Elasticsearch bulk request fails #1157

wants to merge 2 commits into from

Conversation

srosenthal
Copy link

My company has some Titan instances that get a lot of traffic. When Elasticsearch requests time out or fail, Titan 0.5.x would ignore the failure. We'd prefer it to fail more loudly.

The latest 0.9.x versions have done something very similar here:
https://github.com/thinkaurelius/titan/blob/0.9.0-M2/titan-es/src/main/java/com/thinkaurelius/titan/diskstorage/es/ElasticSearchIndex.java#L600

srosenthal and others added 2 commits September 9, 2015 21:02
Previously the bulk requests would ignore Elasticsearch failures. This has been fixed in Titan 0.9.0-M2 but not in 0.5.x
@titan-cla
Copy link

Hi @srosenthal, thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes.

@titan-cla
Copy link

You did it @srosenthal!

Thank you for signing the Contribution License Agreement.

@dalaro dalaro added this to the Titan0.5.5 milestone Dec 17, 2015
@dalaro dalaro self-assigned this Dec 17, 2015
@graben1437
Copy link
Contributor

@dalaro: I believe the premise of this pull request to be valid for Titan 1.1 - although it looks like 75% of this pull request is already implemented in the Titan 1.1 ElasticSearchIndex.java file.

The differences between the pull request and Titan 1.1 version of ElasticSearchIndex.java are that the logic in checkBulkResponseForFailures is "inlined" for the if (bulkrequests > 0) case, and non-existent yet for the if (requests > 0) case.

My recommendation for Titan 1.1 is to create a pull request that essentially implements the code submitted here in the pull request - but with slight changes that acknowledge the imports, etc. are already in Titan 1.1 code. In otherwords, just update the code here to fit Titan 1.1 current code and include it. Can you please advise ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants