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

Internal: replace empty index block checks with global block checks #10530

Closed
tlrx opened this issue Apr 10, 2015 · 1 comment · Fixed by #27050
Closed

Internal: replace empty index block checks with global block checks #10530

tlrx opened this issue Apr 10, 2015 · 1 comment · Fixed by #27050
Labels

Comments

@tlrx
Copy link
Member

tlrx commented Apr 10, 2015

While working on #9203 we noticed (see comment) that many checkBlock() methods were checking blocks on an empty index like this:

protected ClusterBlockException checkBlock(PutIndexTemplateRequest request, ClusterState state) {
        return state.blocks().indexBlockedException(ClusterBlockLevel.METADATA, "");
}

I think most of this kind of calls can be replaced by a global block check like:

return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA);
@javanna
Copy link
Member

javanna commented Apr 10, 2015

+1 we might have to dig if that is indeed a 1:1 replacement, but for sure the different checkBlock variants could be clarified a bit. I think if it's about index blocks they shouldn't accept empty indices ideally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants