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

Deduplicate concrete indices after indices resolution #14316

Merged
merged 1 commit into from Oct 27, 2015

Conversation

javanna
Copy link
Member

@javanna javanna commented Oct 27, 2015

This commit fixes a regression introduced with #12058 as we are not deduplicating concrete indices after indices resolution anymore. This causes failures with the delete index api when providing the same index name multiple times in the request, or aliases/wildcard expressions that end up pointing to the same concrete index. The bug was revealed after merging #11258 as we delete indices in batch rather than one by one. The master node will expect too many acknowledgements based on the number of indices that it's trying to delete, hence the request will never be acknowledged by all nodes.

@@ -141,7 +141,7 @@ public IndexNameExpressionResolver(Settings settings) {
}
}

List<String> concreteIndices = new ArrayList<>(expressions.size());
Set<String> concreteIndices = new HashSet<>(expressions.size());
Copy link
Contributor

Choose a reason for hiding this comment

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

ohoh :) can we make it final?

@s1monw
Copy link
Contributor

s1monw commented Oct 27, 2015

LGTM left a minor - no need to review again!

This commit fixes a regression introduced with elastic#12058. This causes failures with the delete index api when providing the same index name multiple times in the request, or aliases/wildcard expressions that end up pointing to the same concrete index. The bug was revealed after merging elastic#11258 as we delete indices in batch rather than one by one. The master node will expect too many acknowledgements based on the number of indices that it's trying to delete, hence the request will never be acknowledged by all nodes.

Closes elastic#14316
@javanna javanna merged commit 7eaac7b into elastic:master Oct 27, 2015
javanna added a commit to javanna/elasticsearch that referenced this pull request Oct 27, 2015
This commit fixes a regression introduced with elastic#12058. This causes failures with the delete index api when providing the same index name multiple times in the request, or aliases/wildcard expressions that end up pointing to the same concrete index. The bug was revealed after merging elastic#11258 as we delete indices in batch rather than one by one. The master node will expect too many acknowledgements based on the number of indices that it's trying to delete, hence the request will never be acknowledged by all nodes.

Closes elastic#14316
javanna added a commit to javanna/elasticsearch that referenced this pull request Oct 27, 2015
This commit fixes a regression introduced with elastic#12058. This causes failures with the delete index api when providing the same index name multiple times in the request, or aliases/wildcard expressions that end up pointing to the same concrete index. The bug was revealed after merging elastic#11258 as we delete indices in batch rather than one by one. The master node will expect too many acknowledgements based on the number of indices that it's trying to delete, hence the request will never be acknowledged by all nodes.

Closes elastic#14316
javanna added a commit to javanna/elasticsearch that referenced this pull request Oct 27, 2015
This commit fixes a regression introduced with elastic#12058. This causes failures with the delete index api when providing the same index name multiple times in the request, or aliases/wildcard expressions that end up pointing to the same concrete index. The bug was revealed after merging elastic#11258 as we delete indices in batch rather than one by one. The master node will expect too many acknowledgements based on the number of indices that it's trying to delete, hence the request will never be acknowledged by all nodes.

Closes elastic#14316
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants