elasticsearch-ephemeral: Disable automatic creation of indices#1949
Merged
elasticsearch-ephemeral: Disable automatic creation of indices#1949
Conversation
jschaul
reviewed
Nov 29, 2021
Member
jschaul
left a comment
There was a problem hiding this comment.
🎆 Looks good, saw this working on screen share 😸
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR disables the automatic creation of indices in the
elasticsearch-ephemeralchart.Without this PR ES will create an index whenever a document is attempted to be indexed. This leads to a race-condition right after the
elasticsearch-ephemeralrelease is deployed and all indices have been removed:A)
brigorbrig-index-migrate-dataindexes a user into a newly auto-created indexdirectory(with an incorrect mapping)B) The
elasticsearch-index-createjob creates a indexdirectory(with the correct mapping) if it doesn't exist yetIf A) happens before B) the
directoryindex is useless to brig. Brig will not be able to find any users, because it assumes that fields liketeamare of typekeyword. The auto-created index however gives all fields the typetext.If B) happens before A) all is good.
This PR assures that A) cannot happen before B), because auto-creation is disabled.
Checklist