-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add RemoveBlock API to allow DELETE /{index}/_block/{block}
#129128
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
nielsbauman
merged 23 commits into
elastic:main
from
HyunSangHan:api-remove-index-block
Jun 24, 2025
Merged
Changes from 9 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
20e57fe
Add RemoveBlock core service implementation
HyunSangHan 4f223be
Add RemoveBlock transport layer and client APIs
HyunSangHan 0b25da3
Add REST interface for RemoveBlock API
HyunSangHan 4bc5893
Restore settings test and add new remove block test
HyunSangHan 383d1ce
Edit variable name and remove unnecessary overrides
HyunSangHan 017a4f0
Pass timeout parameters directly in RemoveIndexBlockRequest constructor
HyunSangHan 53895fc
Move cluster task logic to transport action
nielsbauman a5c86d0
Use `ProjectState`
nielsbauman 9f57645
Make request cancelleable
nielsbauman 38b06aa
Fix broken test cases using prepareRemoveBlock
HyunSangHan 131bfb0
Update remove_block API test to use capabilities feature
HyunSangHan 7c602bc
Remove redundant description in index-block.md
HyunSangHan 2d50a14
Add new line to the end of indices.remove_block.json
HyunSangHan b6f408f
Reorder test assertions in testRemoveIndexBlockIsRejected
HyunSangHan 3231236
Fix bug for getting block name
HyunSangHan 7c0b881
Fix assertion for blockedIndexCountListener
HyunSangHan 8ba7e68
Remove unused constant
HyunSangHan 0ff2031
Merge branch 'main' into api-remove-index-block
nielsbauman 15461ad
Add changelog
nielsbauman 1a2e208
Merge branch 'main' into api-remove-index-block
nielsbauman bc938f8
Remove VERIFIED_READ_ONLY_SETTING when write blocks are cleared
HyunSangHan 6f59e01
Refactor `hasBlock`
nielsbauman 9fe16a4
Merge branch 'main' into api-remove-index-block
nielsbauman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
rest-api-spec/src/main/resources/rest-api-spec/api/indices.remove_block.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| { | ||
| "indices.remove_block": { | ||
| "documentation": { | ||
| "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html", | ||
| "description": "Removes a block from an index." | ||
| }, | ||
| "stability": "stable", | ||
| "visibility": "public", | ||
| "headers": { | ||
| "accept": [ | ||
| "application/json" | ||
| ] | ||
| }, | ||
| "url": { | ||
| "paths": [ | ||
| { | ||
| "path": "/{index}/_block/{block}", | ||
| "methods": [ | ||
| "DELETE" | ||
| ], | ||
| "parts": { | ||
| "index": { | ||
| "type": "list", | ||
| "description": "A comma separated list of indices to remove a block from" | ||
| }, | ||
| "block": { | ||
| "type": "string", | ||
| "description": "The block to remove (one of read, write, read_only or metadata)" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "params": { | ||
| "timeout": { | ||
| "type": "time", | ||
| "description": "Explicit operation timeout" | ||
| }, | ||
| "master_timeout": { | ||
| "type": "time", | ||
| "description": "Specify timeout for connection to master" | ||
| }, | ||
| "ignore_unavailable": { | ||
| "type": "boolean", | ||
| "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)" | ||
| }, | ||
| "allow_no_indices": { | ||
| "type": "boolean", | ||
| "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)" | ||
| }, | ||
| "expand_wildcards": { | ||
| "type": "enum", | ||
| "options": [ | ||
| "open", | ||
| "closed", | ||
| "hidden", | ||
| "none", | ||
| "all" | ||
| ], | ||
| "default": "open", | ||
| "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both." | ||
| } | ||
| } | ||
| } | ||
| } | ||
nielsbauman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.