opensearch-project / opensearch-project/opensearch-java
[BUG] Unable to set/unset index blocks to read_only
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 165
- Forks
- 250
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 26
Description
I am using opensearch-java-2.8.0 and trying to set the index block to read_only using the below code.
PutIndicesSettingsResponse response = elasticSearchIndicesClient.putSettings(b->b.index(index)
.settings(s->s.blocksReadOnly(true)));
and then trying to unset it by passing false
I get the below error while unsetting it.
org.opensearch.client.opensearch._types.OpenSearchException: Request failed: [cluster_block_exception] index ["some_index"] blocked by: [FORBIDDEN/5/index read-only (api)];
Please let me know the correct way to set it and you can close this if this is not a issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the PutIndicesSettings request shown in the issue, testing both blocksReadOnly(true) and false against the index settings API. Inspect the resulting request and cluster_block_exception response to determine whether the behavior is in the Java client or the OpenSearch API; done means documenting the supported way to set and unset the block.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100