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

Missing parent routing causes NullPointerException in Bulk API #8506

Closed
wants to merge 1 commit into from
Closed

Missing parent routing causes NullPointerException in Bulk API #8506

wants to merge 1 commit into from

Conversation

markharwood
Copy link
Contributor

Now each error is reported in bulk response rather than causing entire bulk to fail.
Added a Junit test but the use of TransportClient means the error is manifested differently to a REST based request - instead of a NullPointer the whole of the bulk request failed with a RoutingMissingException. Changed TransportBulkAction to catch this exception and treat it the same as the existing logic for a ElasticsearchParseException - the individual bulk request items are flagged and reported individually rather than failing the whole bulk request.

Closes #8365

…ion.

Now each error is reported in bulk response rather than causing entire bulk to fail.
Added a Junit test but the use of TransportClient means the error is manifested differently to a REST based request - instead of a NullPointer the whole of the bulk request failed with a RoutingMissingException. Changed TransportBulkAction to catch this exception and treat it the same as the existing logic for a ElasticsearchParseException - the individual bulk request items are flagged and reported individually rather than failing the whole bulk request.

Closes #8365
@s1monw
Copy link
Contributor

s1monw commented Nov 17, 2014

LGTM

@markharwood
Copy link
Contributor Author

Implements the alternative approach to fixing the NullPointerException outlined here: #8378 (comment)

@markharwood
Copy link
Contributor Author

Pushed commits d1c6d3b and 6f79d67 to master, 1.x and 1.4

@markharwood
Copy link
Contributor Author

Pushed to 1.3

@clintongormley clintongormley changed the title Bulk indexing issue - missing parent routing causes NullPointerException Bulk API: Missing parent routing causes NullPointerException Nov 25, 2014
@clintongormley clintongormley changed the title Bulk API: Missing parent routing causes NullPointerException Missing parent routing causes NullPointerException in Bulk API Jun 8, 2015
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Parent/Child labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories v1.3.6 v1.4.1 v1.5.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bulk update child doc, NPE error message when parent is not specified
3 participants