elasticsearch/elasticsearch — pull request #8901 by s1monw (2014-12-11 14:43:18+00:00)
Title: [SCRIPT] ScriptService can deadlock entire nodes if script index is recovering

we currently have operationThreaded set to false when indexing a script. This setting
means that if we are executing the operation locally that we don't spawn a new thread for
it although incoming thread in this case is the network thread. Now since we are indexing here
the engine is currently recovering which sometimes locks the engine for finalization blocks on
a network call waiting for the recovery target to come back the internal lock in engine will never be
released since we are waiting with our network thread for it to be released.

here is a smoking gun:

```
http://build-us-00.elasticsearch.org/job/es_core_1x_suse/164/
```

the interested reader follows the thread dump ;)