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

[BUG] resource_already_exists_exception when using async OpenSearch service #950

Closed
seankao-az opened this issue Nov 27, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@seankao-az
Copy link
Collaborator

What is the bug?
If the OpenSearch service used for managing flint index handles requests asynchronously, we might get error when creating Flint index:

OpenSearchStatusException[OpenSearch exception [type=resource_already_exists_exception, reason=Update to the indices [(redacted)] failed due to either concurrent update or deletion of the indices]]
    at org.opensearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:207)
    at org.opensearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:2228)
    at org.opensearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:2205)
    at org.opensearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1924)
    at org.opensearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1894)
    at org.opensearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1858)
    at org.opensearch.client.IndicesClient.putMapping(IndicesClient.java:373)

This is due to requests for update mapping made to the OpenSearch service while create index request is still being processed.

How can one reproduce the bug?
Steps to reproduce the behavior:
Use Amazon OpenSearch Serverless and try to create Flint index. It might happen but not consistently.

What is the expected behavior?
Index creation should succeed without error.

@seankao-az seankao-az added bug Something isn't working untriaged labels Nov 27, 2024
@seankao-az seankao-az self-assigned this Nov 27, 2024
@seankao-az
Copy link
Collaborator Author

Upon further investigation, AOSS internal operations (update index settings) can also conflict with our update mappings request and result in this failure. AOSS support suggests us retry our request in such case, which is already implemented and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants