-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG] Exception raised even though number of shard copies is a multiple of awareness attributes #8205
Comments
I think the next step should be to narrow this down to an API call/REST request that produces |
@imRishN is this related Zone Decommission? any idea |
Hi @anasalkouz , @IanHoang , This is related to balanced replica count : #3461
You are accounting for number of shards in the index as well. In the calculation we just check for total copies of a given shard and that should be a multiple of AZ count . Since you are having 18 shards in total , I reckon the total copies of 1 shard is 2 which is not a multiple of 3 , hence you are getting validation exception. |
This is trivial to reproduce:
Creating the index will fail. I was able to work around this by copying the configuration of an automatically generated index. Here are the settings I used:
|
I am also facing a similar failure when trying to restore from one domain to another in the same AWS region and both the domain are at the latest
Current index settings are:
Also, I've tried with settings having |
Faced the same issue. Was able to resolve by disabling Stand-By mode and then running the restore command. |
This did the trick for me as well on a newly created 3-AZ, 3-node opensearch domain. After turning off standby I was able to restore a snapshot from s3. |
@gbbafna thanks for digging this up, is there something we need/can fix/improve in OpenSearch (e.g. error message) or should this be closed? |
@sapatel12 , @rsolano : The snapshot restore has an override index setting param also , which can be used here
Hi @dblock , The error message is descriptive in itself . I am going to close this one. |
Describe the bug
We opened an issue in opensearch-py (opensearch-project/opensearch-py#411) but realized that the issue might be related to OpenSearch core instead.
OpenSearch-Benchmark (OSB) uses opensearch-py under the hood to perform CRUD operations on target clusters. Before users run a test, they can store their metrics and results in a datastore, which is often another opensearch cluster. Users have can override the index settings within this datastore by specifying the following in a config:
Using the example above, there should be a total of
18
shards for each index in the datastore cluster. When we curl the datastore cluster, the indices have the correct primary and replica count set.However, when we try to use the same config settings for another datastore cluster that has 3AZs and has the settings
default_number_of_replicas = 2
, we encounter this issue:18
should work since it's a multiple of 3. The only way we found to get around this issue with the same datastore configuration is withdatastore.number_of_replicas = 2
. We've been using managed service datastore clusters. We're curious ifdefault_number_of_replicas = 2
is the culprit.To Reproduce
The option to edit the number of shards and replicas for the datastore is not officially out yet. However, it does exist on a feature branch in a forked repository. Let me know if you'd like to test it out and I can provide it.
Expected behavior
Since my cluster has 3AZs, it should work since
18
is a multiple of 3.Plugins
None
Screenshots
None
Host/Environment (please complete the following information):
Shouldn't matter in this situation since running against an external cluster but running the client on my local machine, which is a MacOS/X86
Additional context
The text was updated successfully, but these errors were encountered: