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

Add index_auto_create flag per index request #55267

Closed
benwtrent opened this issue Apr 15, 2020 · 2 comments · Fixed by #58917
Closed

Add index_auto_create flag per index request #55267

benwtrent opened this issue Apr 15, 2020 · 2 comments · Fixed by #58917
Labels
>enhancement Team:Data Management Meta label for data/management team

Comments

@benwtrent
Copy link
Member

benwtrent commented Apr 15, 2020

The following scenario has caused a number of bugs and many hours of frustrations:

  • We desire an alias to be created with a backing concrete index(es)
  • There is one place in the code that forgets to create the alias + concrete indices ahead of time (either through programmer error, or a race condition)
  • The alias is created as a concrete index and then must be correct through manual means (user intervention on system indices).

To prevent this type of problem, it would be better to fail fast and allow the code paths to recover and optionally create the alias.

A flag on (bulk) index requests that disallow the index to be auto created would be LOVELY. This would help prevent silent failures and enable error handling paths fix the fast failures.

//CC @dakrone

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Features)

@benwtrent benwtrent changed the title Add index_auto_create flag per request Add index_auto_create flag per index request Apr 15, 2020
@benwtrent
Copy link
Member Author

//CC @elastic/ml-core

@rjernst rjernst added the Team:Data Management Meta label for data/management team label May 4, 2020
benwtrent added a commit that referenced this issue Jul 17, 2020
This commit adds the `require_alias` flag to requests that create new documents.

This flag, when `true` prevents the request from automatically creating an index. Instead, the destination of the request MUST be an alias.

When the flag is not set, or `false`, the behavior defaults to the `action.auto_create_index` settings.

This is useful when an alias is required instead of a concrete index.

closes #55267
benwtrent added a commit to benwtrent/elasticsearch that referenced this issue Jul 17, 2020
This commit adds the `require_alias` flag to requests that create new documents.

This flag, when `true` prevents the request from automatically creating an index. Instead, the destination of the request MUST be an alias.

When the flag is not set, or `false`, the behavior defaults to the `action.auto_create_index` settings.

This is useful when an alias is required instead of a concrete index.

closes elastic#55267
benwtrent added a commit that referenced this issue Jul 17, 2020
…#59769)

* Adding new `require_alias` option to indexing requests (#58917)

This commit adds the `require_alias` flag to requests that create new documents.

This flag, when `true` prevents the request from automatically creating an index. Instead, the destination of the request MUST be an alias.

When the flag is not set, or `false`, the behavior defaults to the `action.auto_create_index` settings.

This is useful when an alias is required instead of a concrete index.

closes #55267
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement Team:Data Management Meta label for data/management team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants