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

Indexing with ?require_alias=true should create missing data streams #99882

Open
DaveCTurner opened this issue Sep 25, 2023 · 2 comments
Open
Labels
>bug :Data Management/Data streams Data streams and their lifecycles Team:Data Management Meta label for data/management team

Comments

@DaveCTurner
Copy link
Contributor

The ?require_alias=true parameter to the indexing APIs is there to let users block indexing before the cluster is properly configured, particularly preventing auto-creation of an index if the intended target was an alias which points to a different index. However, today it also prevents auto-creation of a data stream, even if there is a template installed which shows how the data stream should be created. If there's an appropriate template then the cluster is properly configured, so IMO we should auto-create the missing data stream when processing an indexing request with ?require_alias=true.

@DaveCTurner DaveCTurner added >bug :Data Management/Data streams Data streams and their lifecycles labels Sep 25, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Sep 25, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@DaveCTurner
Copy link
Contributor Author

Andrei rightly points out that data-stream aliases make this a little more complicated. For starters the name ?require_alias suggests a data-stream alias might be required, and it's possible that different users would want different behaviour in that regard. But also we could in principle satisfy "requires a data-stream alias" by creating one of several different data streams each with the same alias in their template. Although it seems invalid for all those templates to specify that their alias is the write alias, we could reject in that case.

Perhaps we need to expand the parameter to have more values than just ?require_alias and ?require_alias=true and ?require_alias=false. Or perhaps we do need another parameter after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Data streams Data streams and their lifecycles Team:Data Management Meta label for data/management team
Projects
None yet
Development

No branches or pull requests

2 participants