# Dynamic Mapping and Pending Tasks

**URL:** <https://discuss.elastic.co/t/dynamic-mapping-and-pending-tasks/28604>\
**Category:** Elasticsearch\
**Created:** [September 3, 2015, 12:10pm UTC](https://discuss.elastic.co/t/dynamic-mapping-and-pending-tasks/28604 "2015-09-03T12:10:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ananth](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ananth](https://discuss.elastic.co/u/ananth)\
**Post date:** [September 3, 2015, 12:10pm UTC](https://discuss.elastic.co/t/dynamic-mapping-and-pending-tasks/28604/1 "2015-09-03T12:10:51Z")

</div>

Hi,

We are dynamically adding new fields to our index. It creates large number of pending tasks especially "refresh-mapping" tasks . We are creating daily indices , once a day rotated for the first 7 or 8 hours we have 4000 to 5000 refresh-mapping tasks on same index(and same type too). On looking into es source found the following commands in **MetaDataMappingService.executeRefreshOrUpdate()**

```
 * Batch method to apply all the queued refresh or update operations. The idea is to try and batch as much
 * as possible so we won't create the same index all the time for example for the updates on the same mapping
 * and generate a single cluster change event out of all of those.

```

For how many refresh-mapping tasks , a update-mapping task will be called or is there a time-limit? What metric **"as much as possible"** refers ? (Sorry if i missing anything ?)

Due to this large number of pending tasks , node joining tasks also getting delayed . Node-disconnects had IMMEDIATE priority where as Node-Joining has only HIGH priority. Due to this priority mismatch client nodes facing little delay to join the cluster .

What is the purpose of "indices.cluster.send\_refresh\_mapping" property ? What happen if i set indices.cluster.send\_refresh\_mapping to false in production (whether It is recommended )?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 5, 2015, 1:14am UTC](https://discuss.elastic.co/t/dynamic-mapping-and-pending-tasks/28604/2 "2015-09-05T01:14:40Z")

</div>

What version are you on?

---

<div class="post-metadata">

**Author:** ![ananth](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ananth](https://discuss.elastic.co/u/ananth)\
**Post date:** [September 5, 2015, 11:40am UTC](https://discuss.elastic.co/t/dynamic-mapping-and-pending-tasks/28604/3 "2015-09-05T11:40:36Z")

</div>

Thanks for the reply Mark. We are using elasticsearch 1.6.0.

---

<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:** [July 5, 2017, 11:51pm UTC](https://discuss.elastic.co/t/dynamic-mapping-and-pending-tasks/28604/4 "2017-07-05T23:51:59Z")

</div>


