Skip to content

Integrate project global blocks into existing checks for cluster blocks (Part 2) #129570

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

Merged

Conversation

pxsalehi
Copy link
Member

I went through the second half of callers to globalBlockedException and updated the obvious cases.

Relates #129467
Resolves ES-11209

@pxsalehi pxsalehi added >non-issue :Distributed Coordination/Distributed A catch all label for anything in the Distributed Coordination area. Please avoid if you can. labels Jun 17, 2025
@pxsalehi pxsalehi requested a review from ywangd June 17, 2025 16:03
@elasticsearchmachine elasticsearchmachine added Team:Distributed Coordination Meta label for Distributed Coordination team v9.1.0 labels Jun 17, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination)

Copy link
Member

@ywangd ywangd left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 125 to 129
@FixForMultiProject(
description = "Many actions extend TransportSingleShardAction, consider checking for project global blocks when applicable"
)
protected static ClusterBlockException checkGlobalBlock(ProjectState state) {
return state.blocks().globalBlockedException(ClusterBlockLevel.READ);
Copy link
Member

Choose a reason for hiding this comment

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

Since this action always involves a shard which always belongs to a project, I think we can add projectResolver.getProjectId() here without having to defer this as future work? The checkRequestBlock method below already checks project indices blocks. Or maybe I am missing something?

@pxsalehi pxsalehi enabled auto-merge (squash) June 18, 2025 07:48
@pxsalehi pxsalehi merged commit a229c8d into elastic:main Jun 18, 2025
27 checks passed
kderusso pushed a commit to kderusso/elasticsearch that referenced this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Distributed A catch all label for anything in the Distributed Coordination area. Please avoid if you can. >non-issue Team:Distributed Coordination Meta label for Distributed Coordination team v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants