Skip to content
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

[FEATURE] Creating an index fails with OpenSearch Carbon domain, and the error message is not meaningful. #252

Open
Tracked by #281
penghuo opened this issue Feb 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@penghuo
Copy link
Collaborator

penghuo commented Feb 12, 2024

Is your feature request related to a problem?

  • submit create skipping index query
CREATE SKIPPING INDEX
ON table (
   region PARTITION
  ) WITH (
index_settings = '{"number_of_shards":5,"number_of_replicas":1}',
auto_refresh = false
)
  • Error message is not meaningful
Fail to run query, cause: Failed to create Flint index"

What solution would you like?
meaningful error message could help user understand issue. for instance

expected total copies needs to be a multiple of total awareness attributes

What alternatives have you considered?
n/a

Do you have any additional context?

  • As OpenSearch carbon domain required at least 2 replica, create index failed.
Caused by: org.opensearch.OpenSearchStatusException: OpenSearch exception [type=illegal_argument_exception, reason=Validation Failed: 1: expected total copies needs to be a multiple of total awareness attributes [3];]
	at org.opensearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:207) ~[opensearch-spark-standalone_2.12-0.1.0.jar:0.1.0-SNAPSHOT]
	at org.opensearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:2228) ~[opensearch-spark-standalone_2.12-0.1.0.jar:0.1.0-SNAPSHOT]
	at org.opensearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:2205) ~[opensearch-spark-standalone_2.12-0.1.0.jar:0.1.0-SNAPSHOT]
	at org.opensearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1924) ~[opensearch-spark-standalone_2.12-0.1.0.jar:0.1.0-SNAPSHOT]
	at org.opensearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1894) ~[opensearch-spark-standalone_2.12-0.1.0.jar:0.1.0-SNAPSHOT]
	at org.opensearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1858) ~[opensearch-spark-standalone_2.12-0.1.0.jar:0.1.0-SNAPSHOT]
	at org.opensearch.client.IndicesClient.create(IndicesClient.java:159) ~[opensearch-spark-standalone_2.12-0.1.0.jar:0.1.0-SNAPSHOT]
	at org.opensearch.flint.core.storage.FlintOpenSearchClient.createIndex(FlintOpenSearchClient.java:139) ~[opensearch-spark-standalone_2.12-0.1.0.jar:0.1.0-SNAPSHOT]
	... 61 more
	Suppressed: org.opensearch.client.ResponseException: method [PUT], host [https://search-icebergtestingv2-ntbjwi6vf3bipfucuonbb3vplq.us-west-2.es.amazonaws.com], URI [/xxx ?master_timeout=30s&timeout=30s], status line [HTTP/1.1 400 Bad Request]
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Validation Failed: 1: expected total copies needs to be a multiple of total awareness attributes [3];"}],"type":"illegal_argument_exception","reason":"Validation Failed: 1: expected total copies needs to be a multiple of total awareness attributes [3];"},"status":400}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants