Hi, I am seeing an IndexMissingException when I do an index create
followed immediately by refresh.
first of all, my setup is:
- ES 0.12.1
- Java client API, embedded no-data node
- local gateway
- remote ES data node
My pseudocode goes like this:
- create index (1 shard, 0 replica for batch indexing)
- add documents if any
In my first attempt I didn't have documents in my DB, so create was
followed by refresh without delay, in that case I am seeing:
Exception in thread "Thread-6"
When I call create index I wait for the future to finish with:
CreateIndexResponse response = future.actionGet();
When using "curl" to the remote ES node I can see the index is in fact
created, contrary to the exception.
If I add a 100ms delay in the "add documents" step everything works
OK, that's why I think it must be a concurrency issue, locking bug or
I understand that creating an index and then refreshing it is
pointless, I expect "add documents" to actually add some, but in this
case the DB was still empty and this weird thing happened. I could add
some checks in my code for that case, but I think it must be a tiny
bug that's better tackled. I could help with more details or tests if
somebody wishes to trace the problem.