# Thread blocked due to error org.elasticsearch.common.util.concurrent.BaseFuture$Sync

**URL:** <https://discuss.elastic.co/t/thread-blocked-due-to-error-org-elasticsearch-common-util-concurrent-basefuture-sync/161808>\
**Category:** Elasticsearch\
**Created:** [December 21, 2018, 8:23am UTC](https://discuss.elastic.co/t/thread-blocked-due-to-error-org-elasticsearch-common-util-concurrent-basefuture-sync/161808 "2018-12-21T08:23:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![santoshcbmi](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@santoshcbmi](https://discuss.elastic.co/u/santoshcbmi)\
**Post date:** [December 21, 2018, 8:23am UTC](https://discuss.elastic.co/t/thread-blocked-due-to-error-org-elasticsearch-common-util-concurrent-basefuture-sync/161808/1 "2018-12-21T08:23:08Z")

</div>

Hi All,

```
   I am getting Thread blocked state when executing the getChildrenCount() using the _parent key.

```

We have a Parent - Child mapping with \_parent as parentKey in child. While retrieving the children count using the parentKey we are seeing the Thread blocked issue.  
Between the issue happens only when there is a large amount of data being upsert with miltiple threads.

ElasticSearch 5.5-  
Below is the sample code causing the blockage - In below code we are trying to get the no of children using parentKey  
#####################################################################  
SearchResponse response = new SearchRequestBuilder(  
esClient.getClient(), SearchAction.INSTANCE)  
.setIndices(esClient.getIndex()).setTypes(esClient.getAppType())  
.setQuery(QueryBuilders.parentId(VCSConstants.APP\_TYPE, parentKey))  
.setSize(0).get();  
#####################################################################

Exception -  
_**"admin-http-pool867" #499694 daemon prio=5 os\_prio=0 tid=0x00007f7660017fd0 nid=0x67b2 waiting on condition [0x00007f7416284000]**_  
_\*\* java.lang.Thread.State: WAITING (parking)\*\*_  
_\*\* at sun.misc.Unsafe.park(Native Method)\*\*_  
_\*\* - parking to wait for \<0x000000070f076ad8\> (a org.elasticsearch.common.util.concurrent.BaseFuture$Sync)\*\*_  
_\*\* at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)\*\*_  
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)  
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)  
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)  
at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:248)  
at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:91)  
at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:42)

Please let me know your thoughts on this?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 18, 2019, 8:23am UTC](https://discuss.elastic.co/t/thread-blocked-due-to-error-org-elasticsearch-common-util-concurrent-basefuture-sync/161808/2 "2019-01-18T08:23:14Z")

</div>

Closed on January 18, 2019, 8:23am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
