Throw an exception when an Elasticsearch bulk request fails#1157
Throw an exception when an Elasticsearch bulk request fails#1157srosenthal wants to merge 2 commits intothinkaurelius:titan05from srosenthal:titan05
Conversation
Previously the bulk requests would ignore Elasticsearch failures. This has been fixed in Titan 0.9.0-M2 but not in 0.5.x
|
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. |
|
You did it @srosenthal! Thank you for signing the Contribution License Agreement. |
|
@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 ? |
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