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

Make index rollover action atomic #28039

Closed
wants to merge 1 commit into from

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Jan 1, 2018

Today when executing a rollover request, we create an index with alias
(via template), then update index aliases in two separate cluster tasks.
In the interval between these two actions, the alias will associate to
two indices. This causes indexing requests to that alias to be rejected.

This commit merges these two actions into a single cluster update task.

Closes #26976

Today when executing a rollover request, we create an index with alias
(via template), then update index aliases in two separate cluster tasks.
In the interval between these two actions, the alias will associate to
two indices. This causes indexing requests to that alias to be rejected.
@ywelsch
Copy link
Contributor

ywelsch commented Jan 2, 2018

I think that the reason for separating index creation and rolling over the alias was for the rollover only to happen after the new index is fully initialized (primaries started), to keep indexing nicely flowing. I could be wrong though, maybe @s1monw can clarify.

@dnhatn dnhatn requested a review from s1monw January 3, 2018 16:53
@s1monw
Copy link
Contributor

s1monw commented Jan 4, 2018

I agree this with @ywelsch this is not the right solution. I think the issue here is that the alisa is modifed by the user in an inappropriate way. To make this error more self explaining I think the rollover API should fail if the Alias we try to roll over contains more than one alias OR if it contains an index pattern. The alias is a write alias as documented and can only have a single index associated with it.

@dnhatn
Copy link
Member Author

dnhatn commented Jan 4, 2018

Thanks @ywelsch and @s1monw, I am closing it. I will take another approach as @s1monw suggested.

@dnhatn dnhatn closed this Jan 4, 2018
@dnhatn dnhatn deleted the atomic-rollover branch January 4, 2018 14:41
@clintongormley clintongormley added :Data Management/Indices APIs APIs to create and manage indices and templates and removed :Rollover labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Indices APIs APIs to create and manage indices and templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants