# Primary & replica shards with different size

**URL:** <https://discuss.elastic.co/t/primary-replica-shards-with-different-size/254849>\
**Category:** Elasticsearch\
**Created:** [November 10, 2020, 5:52am UTC](https://discuss.elastic.co/t/primary-replica-shards-with-different-size/254849 "2020-11-10T05:52:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![smm](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@smm](https://discuss.elastic.co/u/smm)\
**Post date:** [November 10, 2020, 5:52am UTC](https://discuss.elastic.co/t/primary-replica-shards-with-different-size/254849/1 "2020-11-10T05:52:57Z")

</div>

Hi there,  
yesterday I saw that a primary shard and its replica do have a different size.

GET /\_cat/shards/dus-log-3v\_mcc\_pp\_dev-6.6.0-2020.42  
dus-log-3v\_mcc\_pp\_dev-6.6.0-2020.42 0 p STARTED 29677 35.9mb X.X.X.X node1  
dus-log-3v\_mcc\_pp\_dev-6.6.0-2020.42 0 r STARTED 29677 34.4mb X.X.X.Y node2

How can that happen? I thought they should be identical.  
And: Is there something I have to do / check about it?

kind regards  
Stefano

---

<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:** [November 10, 2020, 5:56am UTC](https://discuss.elastic.co/t/primary-replica-shards-with-different-size/254849/2 "2020-11-10T05:56:18Z")

</div>

The document count is identical, there may be differences in segments though, which would account for that.

---

<div class="post-metadata">

**Author:** ![smm](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@smm](https://discuss.elastic.co/u/smm)\
**Post date:** [November 10, 2020, 7:26am UTC](https://discuss.elastic.co/t/primary-replica-shards-with-different-size/254849/3 "2020-11-10T07:26:53Z")

</div>

Is there a way to count the documents in a shard?  
cheers  
Stefano

---

<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:** [November 10, 2020, 7:54pm UTC](https://discuss.elastic.co/t/primary-replica-shards-with-different-size/254849/4 "2020-11-10T19:54:05Z")

</div>

That's what the 5th value in the output is.

---

<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:** [December 8, 2020, 7:54pm UTC](https://discuss.elastic.co/t/primary-replica-shards-with-different-size/254849/5 "2020-12-08T19:54:07Z")

</div>

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