Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Entity Analytics] [Entity Store] Fix Asset Criticality index issue w…
…hen setting up entity engines concurrently (elastic#199486) ## Summary If the Entity Engine setup API was called in parallel for the host and user engine, there was an issue where both calls attempt to create the asset criticality index causing 'resource_already_exists_exception' to be thrown. This pull request fixes this by ignoring the `resource_already_exists_exception` when creating indices in our util. To test, setup both engines concurrently: ``` (curl -H 'Content-Type: application/json' -X POST -H 'kbn-xsrf: true' -H 'elastic-api-version: 2023-10-31' http://elastic:changeme@localhost:5601/api/entity_store/engines/host/init -d '{}' & curl -H 'Content-Type: application/json' -X POST -H 'kbn-xsrf: true' -H 'elastic-api-version: 2023-10-31' http://elastic:changeme@localhost:5601/api/entity_store/engines/user/init -d '{}' & wait) ```
- Loading branch information