[
https://issues.jboss.org/browse/RTGOV-574?page=com.atlassian.jira.plugin....
]
ivan mckinley commented on RTGOV-574:
-------------------------------------
Did you test this ?
A quick test to verify if we are affected by this would be to sleep the method. or put a
breakpoint in there
private boolean prepareIndex(Map<String, Object> defaultSettings) {
IndicesExistsResponse res =
_client.admin().indices().prepareExists(_index).execute().actionGet();
thread.sleep(10000);
boolean created = false;
if (!res.isExists()) {
CreateIndexRequestBuilder req =
_client.admin().indices().prepareCreate(_index);
req.setSettings(defaultSettings);
created = req.execute().actionGet().isAcknowledged();
if (!created) {
throw new RuntimeException("Could not create index [" + _index +
"]");
}
}
return created;
}
Investigate 'index already exists' exception when previous
command indicates does not exist
-------------------------------------------------------------------------------------------
Key: RTGOV-574
URL:
https://issues.jboss.org/browse/RTGOV-574
Project: RTGov (Run Time Governance)
Issue Type: Task
Reporter: Gary Brown
Assignee: Gary Brown
Fix For: 2.0.0.Final
When updating to Elasticsearch 1.3.2 (RTGOV-568), noticed that when the EAP server was
restarted, it resulted in an IndexAlreadyExistsException from ES.
However this exception was generated from code called to create the indexes - however
prior to that call it checks with the ES node whether the indexes already exist.
Ivan McKinley found the following reference that may be relevant:
http://stackoverflow.com/questions/23883110/elasticsearch-index-exists-no...
He also suggests:
"If this is the problem then we may have an impact from running “embedded” mode.
The more data we have the longer response from the async process perhaps.
externalising the es process may resolve this.. and another test is to remove the entire
contents of the index/type/ to further prove that we are affect the amount of data.
The various scenarios here are definitely interesting for us regarding
documentation"
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)