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

Always _doc if Beats major version is 7 and ES >= 6 #9573

Merged
merged 1 commit into from
Dec 17, 2018

Conversation

urso
Copy link

@urso urso commented Dec 14, 2018

This only affects master and the Beats 7.x releases.

Testing Beats upgrade with ES master/alpha builds I found one can not create an index by putting an event into an non-existing index if the document type used in the template still states "doc". This could potentially prevent Beats from being able to index, depending on upgrade order (ES issue to be created).
As the index versioning is based on the Beats version, but not the ES version, we want to guarantee some kind of consistency, no matter when Beats or ES is updated and in which order. In case Beats is updated before Elasticsearch, then we want to guarantee the template already uses _doc, such that the template would be the same, no matter when Elasticsearch is updated.

With this change the value of type in the template and when indexing will always be (independent of update order):

ES 6.x ES 7.x+
Beats 6.x doc doc
Beats 7.x _doc _doc

@urso urso requested a review from a team as a code owner December 14, 2018 21:53
@urso urso requested a review from ruflin December 14, 2018 21:53
@ruflin
Copy link
Contributor

ruflin commented Dec 17, 2018

LGTM. Can you add a changelog?

I wonder what happens to users using Beats 6.x with ES 7.x? Do they get a deprecation warning?

@urso
Copy link
Author

urso commented Dec 17, 2018

I wonder what happens to users using Beats 6.x with ES 7.x? Do they get a deprecation warning?

I didn't check with current builds, but in the future they might get deprecation warnings in the Elasticsearch logs.

@urso urso merged commit 6321c5d into elastic:master Dec 17, 2018
urso pushed a commit to urso/beats that referenced this pull request Dec 17, 2018
With elastic#9573 we always use _doc in templates and when indexing.
The commit updates the changelog entry to reflect recent changes.
andrewkroh added a commit to andrewkroh/ecs that referenced this pull request Dec 17, 2018
The template needs updated due to a change in one our dependencies.

elastic/beats#9573
andrewkroh added a commit to elastic/ecs that referenced this pull request Dec 17, 2018
The template needs updated due to a change in one our dependencies.

elastic/beats#9573
urso pushed a commit that referenced this pull request Dec 18, 2018
With #9573 we always use _doc in templates and when indexing.
The commit updates the changelog entry to reflect recent changes.
@urso urso deleted the always-use_doc branch February 19, 2019 18:31
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.

2 participants