Don't block stats for read-only indices#5876
Closed
imotov wants to merge 1 commit intoelastic:masterfrom
Closed
Conversation
Member
|
I am not sure if this is a bug, since it blocks on METADATA operation, which all stats/status/... check on, I don't think we need to change it. Looked at the issue, they should set |
Contributor
Author
|
A possible workaround for this issue is to use |
tlrx
added a commit
to tlrx/elasticsearch
that referenced
this pull request
Jan 8, 2015
While looking at elastic#3703, it looks like the usage of 'read_only' is a bit confusing. The documentation stipulates: > index.blocks.read_only > Set to true to have the index read only, false to allow writes and metadata changes. Actually, it blocks all write operations (creating, indexing or deleting a document) but also all read/write operations on index metadata. This can lead to confusion because subsequent 'indices exists' requests will return an undocumented 403 Forbidden response code where one could expect a 200 OK (as reported in elastic#3703). Same for 'type exists' and 'alias exists' requests. Similar issues have been reported: - _status elastic#2833 (deprecated in 1.2.0) - _stats elastic#5876 - /_cat/indices elastic#5855 But several API calls returns a 403 when at least one index of the cluster has 'index.blocks.read_only' set to true: DELETE /_all POST /library/book/1 { "title": "Elasticsearch: the definitive guide" } POST /movies/dvd/1 { "title": "Elasticsearch: the movie" } PUT /library/_settings { "index": { "blocks.read_only": true } } The following calls will return 403 / "ClusterBlockException[blocked by: [FORBIDDEN/5/index read-only (api)];]": HEAD /library HEAD /library/book HEAD /_all/dvd GET /library/_settings GET /library/_mappings GET /library/_warmers GET /library/_aliases GET /_settings GET /_aliases GET /_mappings GET /_cat/indices I agree to @imotov's comment (see elastic#5876 (comment)) and I think we should split the METADATA blocks in METADATA_READ & METADATA_WRITE blocks. This way the 'read_only' setting will block all write operations and metadata updates but the metadata will still be available. This is a first step in this way, closes elastic#3703
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #5855