Skip to content

Comments

elasticsearch-ephemeral: Disable automatic creation of indices#1949

Merged
smatting merged 2 commits intodevelopfrom
smatting/es-ephem-disable-auto
Nov 29, 2021
Merged

elasticsearch-ephemeral: Disable automatic creation of indices#1949
smatting merged 2 commits intodevelopfrom
smatting/es-ephem-disable-auto

Conversation

@smatting
Copy link
Contributor

@smatting smatting commented Nov 29, 2021

This PR disables the automatic creation of indices in the elasticsearch-ephemeral chart.

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-ephemeral release is deployed and all indices have been removed:

A) brig or brig-index-migrate-data indexes a user into a newly auto-created index directory (with an incorrect mapping)
B) The elasticsearch-index-create job creates a index directory (with the correct mapping) if it doesn't exist yet

If A) happens before B) the directory index is useless to brig. Brig will not be able to find any users, because it assumes that fields like team are of type keyword. The auto-created index however gives all fields the type text.
If B) happens before A) all is good.

This PR assures that A) cannot happen before B), because auto-creation is disabled.

Checklist

  • The PR Title explains the impact of the change.
  • The PR description provides context as to why the change should occur and what the code contributes to that effect. This could also be a link to a JIRA ticket or a Github issue, if there is one.

@smatting smatting merged commit 31b1ea1 into develop Nov 29, 2021
@smatting smatting deleted the smatting/es-ephem-disable-auto branch November 29, 2021 18:08
@smatting smatting requested a review from jschaul November 29, 2021 18:09
Copy link
Member

@jschaul jschaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎆 Looks good, saw this working on screen share 😸

@smatting smatting mentioned this pull request Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants