# UNASSIGNED state after REPLICA\_ADDED

**URL:** <https://discuss.elastic.co/t/unassigned-state-after-replica-added/336326>\
**Category:** Elasticsearch\
**Created:** [June 19, 2023, 6:11am UTC](https://discuss.elastic.co/t/unassigned-state-after-replica-added/336326 "2023-06-19T06:11:25Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![Itay\_Bittan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itay_bittan/32/23527_2.png) [@Itay\_Bittan](https://discuss.elastic.co/u/Itay_Bittan)\
**Post date:** [July 10, 2023, 10:18am UTC](https://discuss.elastic.co/t/unassigned-state-after-replica-added/336326/21 "2023-07-10T10:18:34Z")

</div>

@DavidTurner should I ask it (last comment) as a separate question or do you think that it is might be related to the original question?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 10, 2023, 10:28am UTC](https://discuss.elastic.co/t/unassigned-state-after-replica-added/336326/22 "2023-07-10T10:28:45Z")

</div>

Sorry I'm not sure I understand the question. Relocating shards takes time, especially if you're actively indexing into them during the relocation.

---

<div class="post-metadata">

**Author:** ![Itay\_Bittan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itay_bittan/32/23527_2.png) [@Itay\_Bittan](https://discuss.elastic.co/u/Itay_Bittan)\
**Post date:** [July 10, 2023, 6:38pm UTC](https://discuss.elastic.co/t/unassigned-state-after-replica-added/336326/23 "2023-07-10T18:38:28Z")

</div>

sorry, I'll try to clarify.  
My flow is separated to tasks:

1. Create index in dedicated nodes set (data-wrk nodes).
2. Index data (bulks)
3. Relocate shards to other nodes (awareness).

I am talking task 2 - during the bulks operations shards start moving from one node to another (within the same node sets) without any explicit command.  
I guess that Elasticsearch try to balance shards within that node sets, and if so - it's just a waste of time IMO. The screenshots above show the reason for that move (it that's help). I would like to avoid that relocation during the indexing task/phase..

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 10, 2023, 8:03pm UTC](https://discuss.elastic.co/t/unassigned-state-after-replica-added/336326/24 "2023-07-10T20:03:15Z")

</div>

I see. To answer that I think we'd need to understand why ES is moving those shards. Is it balancing them out to 3-per-node? If so, why were they not 3-per-node to start with?

---

<div class="post-metadata">

**Author:** ![Itay\_Bittan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itay_bittan/32/23527_2.png) [@Itay\_Bittan](https://discuss.elastic.co/u/Itay_Bittan)\
**Post date:** [July 10, 2023, 8:31pm UTC](https://discuss.elastic.co/t/unassigned-state-after-replica-added/336326/25 "2023-07-10T20:31:54Z")

</div>

Because there are more indices being baked/indexed at the same time, all of them are located in this `data-wrk` set.  
I guess that Elasticsearch is trying to balance shards because other indices might finish their indexing task and start their relocation to the `data-srv` node-set.  
If that's true, is there a way to disable the balancing for a specific `node.attr`? (my `data-wrk` nodes)

---

<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:** [August 7, 2023, 8:31pm UTC](https://discuss.elastic.co/t/unassigned-state-after-replica-added/336326/26 "2023-08-07T20:31:57Z")

</div>

Closed on August 7, 2023, 8:31pm UTC

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

[Previous page](https://discuss.elastic.co/t/unassigned-state-after-replica-added/336326.md?page=1)
