We have two nodes. The one is node client and other is master node.
I've executed a test case using elasticsearch-0.16.2 as follows.
- send a create index 'data' request to master node at node client.
- wait until 'data' index becomes green state at node client.
- send a index request to 'data' index at node client..
but it resulted in IndexMissingException.
org.elasticsearch.indices.IndexMissingException: [data] missing
at org.elasticsearch.cluster.metadata.MetaData.concreteIndex(MetaData.java:211)
at org.elasticsearch.action.index.TransportIndexAction.innerExecute(TransportIndexAction.java:123)
at org.elasticsearch.action.index.TransportIndexAction.access$000(TransportIndexAction.java:70)
at org.elasticsearch.action.index.TransportIndexAction$1.onFailure(TransportIndexAction.java:110)
at org.elasticsearch.action.support.BaseAction$ThreadedActionListener$2.run(BaseAction.java:95)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Checking existence of 'data' index was failed at "org.elasticsearch.action.index.TransportIndexAction.doExecute(TransportIndexAction.java:101).[in 'index' executor]
So. TransportIndexAction tried to create 'data' index but also failed because of index already exists. [in 'clusterService#updateTask' executor ]
After failure of creating 'data' index "org.elasticsearch.action.index.TransportIndexAction$1.onFailure(TransportIndexAction.java:110)" is invoked
but. ClusterState dosen't have 'data' index. so it thrown IndexMissingException [in 'index' executor ]
I don't know the reason of this problem.
InternalClusterService.clusterState is volatile and there is no delete index operation between creating index and index request.