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

Mappings: Fix get mapping when no indexes exist to not fail in response generation #21924

Merged
merged 1 commit into from Dec 2, 2016

Conversation

Projects
None yet
2 participants
@rjernst
Copy link
Member

rjernst commented Dec 1, 2016

When there are no indexes, get mapping has a series of special cases.
Two of those expect the response object already started, and the other
two respond with an exception. Those two cases (types passed in but no
indexes and vice versa) would fail in their error response generation
because it did not expect an object to already be started in the json
generator. This change moves the object start to where it is needed for
the empty responses.

closes #21916

Mappings: Fix get mapping when no indexes exist to not fail in respon…
…se generation

When there are no indexes, get mapping has a series of special cases.
Two of those expect the response object already started, and the other
two respond with an exception. Those two cases (types passed in but no
indexes and vice versa) would fail in their error response generation
because it did not expect an object to already be started in the json
generator. This change moves the object start to where it is needed for
the empty responses.

closes #21916
@jasontedor
Copy link
Member

jasontedor left a comment

LGTM. I'm comfortable with (and think this should) go into 5.0.3 and 5.1.1.

@rjernst

This comment has been minimized.

Copy link
Member Author

rjernst commented Dec 2, 2016

restest this please

@rjernst rjernst merged commit a6ad89b into elastic:master Dec 2, 2016

1 of 2 checks passed

elasticsearch-ci Build started sha1 is merged.
Details
CLA Commit author is a member of Elasticsearch
Details

@rjernst rjernst deleted the rjernst:fix_mapping_missing_type branch Dec 2, 2016

rjernst added a commit that referenced this pull request Dec 2, 2016

Mappings: Fix get mapping when no indexes exist to not fail in respon…
…se generation (#21924)

When there are no indexes, get mapping has a series of special cases.
Two of those expect the response object already started, and the other
two respond with an exception. Those two cases (types passed in but no
indexes and vice versa) would fail in their error response generation
because it did not expect an object to already be started in the json
generator. This change moves the object start to where it is needed for
the empty responses.

closes #21916

rjernst added a commit that referenced this pull request Dec 2, 2016

Mappings: Fix get mapping when no indexes exist to not fail in respon…
…se generation (#21924)

When there are no indexes, get mapping has a series of special cases.
Two of those expect the response object already started, and the other
two respond with an exception. Those two cases (types passed in but no
indexes and vice versa) would fail in their error response generation
because it did not expect an object to already be started in the json
generator. This change moves the object start to where it is needed for
the empty responses.

closes #21916

rjernst added a commit that referenced this pull request Dec 2, 2016

Mappings: Fix get mapping when no indexes exist to not fail in respon…
…se generation (#21924)

When there are no indexes, get mapping has a series of special cases.
Two of those expect the response object already started, and the other
two respond with an exception. Those two cases (types passed in but no
indexes and vice versa) would fail in their error response generation
because it did not expect an object to already be started in the json
generator. This change moves the object start to where it is needed for
the empty responses.

closes #21916
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.