Anybody knows how different number of primary shards can affect number of
docs (_count) in same index?
I mean I have read-only index OLD, did a snap (ES 1.2) of it and restored
it as NEW. Both have same number shards and docs.
Then I'm restoring another index NEW_10, with less primary shards and I'm
getting less documents count in it?
Doesn't matter how many tried I retested snap and restore, if I don't edit
number of shards I end with good counter, so wonder what messes my case
[:~] curl localhost:9200/_cat/indices/OLD,NEW,NEW_10?v
health index pri rep docs.count docs.deleted store.size
pri.store.size
green OLD 20 2 1333718 78639 15.7gb 5.2gb
green NEW 20 1 1333480 78624 10.5gb 5.2gb
green NEW_10 10 1 666064 42696 5.2gb 2.6gb
Tried simple math, (docs.count - docs.deleted) / pri, but not getting same
result
...some more clarification NEW and NEW_10 are restored from the same snap
taken from OLD.
What differs is before restoring NEW_10, I'm editing manualy number of
shards in the mapping in the snap (hdfs_repository plugin)
On Thursday, January 22, 2015 at 6:22:04 PM UTC-8, Daniel Gligorov wrote:
Hi,
Anybody knows how different number of primary shards can affect number of
docs (_count) in same index?
I mean I have read-only index OLD, did a snap (ES 1.2) of it and restored
it as NEW. Both have same number shards and docs.
Then I'm restoring another index NEW_10, with less primary shards and I'm
getting less documents count in it?
Doesn't matter how many tried I retested snap and restore, if I don't edit
number of shards I end with good counter, so wonder what messes my case
[:~] curl localhost:9200/_cat/indices/OLD,NEW,NEW_10?v
health index pri rep docs.count docs.deleted store.size
pri.store.size
green OLD 20 2 1333718 78639 15.7gb
5.2gb
green NEW 20 1 1333480 78624 10.5gb 5.2gb
green NEW_10 10 1 666064 42696 5.2gb 2.6gb
Tried simple math, (docs.count - docs.deleted) / pri, but not getting same
result
Something I don't get. You are changing the number of shards of an index? This is something you should not be able to do IMHO.
You can not restore the full backup in less shards.
That's probably the reason you are seeing less docs in your new index because you restored only half of shards with what I would call somehow a "hack".
...some more clarification NEW and NEW_10 are restored from the same snap taken from OLD.
What differs is before restoring NEW_10, I'm editing manualy number of shards in the mapping in the snap (hdfs_repository plugin)
On Thursday, January 22, 2015 at 6:22:04 PM UTC-8, Daniel Gligorov wrote:
Hi,
Anybody knows how different number of primary shards can affect number of docs (_count) in same index?
I mean I have read-only index OLD, did a snap (ES 1.2) of it and restored it as NEW. Both have same number shards and docs.
Then I'm restoring another index NEW_10, with less primary shards and I'm getting less documents count in it?
Doesn't matter how many tried I retested snap and restore, if I don't edit number of shards I end with good counter, so wonder what messes my case
[:~] curl localhost:9200/_cat/indices/OLD,NEW,NEW_10?v
health index pri rep docs.count docs.deleted store.size pri.store.size
green OLD 20 2 1333718 78639 15.7gb 5.2gb
green NEW 20 1 1333480 78624 10.5gb 5.2gb
green NEW_10 10 1 666064 42696 5.2gb 2.6gb
Tried simple math, (docs.count - docs.deleted) / pri, but not getting same result
Yup, that's what I meant. I was editing number of shards in the backup.
Thought might work that way, data size to end up same, just in less shards.
Thanks for your opinion.
On Friday, January 23, 2015 at 1:34:21 AM UTC-8, David Pilato wrote:
Something I don't get. You are changing the number of shards of an index?
This is something you should not be able to do IMHO.
You can not restore the full backup in less shards.
That's probably the reason you are seeing less docs in your new index
because you restored only half of shards with what I would call somehow a
"hack".
David
Le 23 janv. 2015 à 03:23, Daniel Gligorov <gligoro...@gmail.com
<javascript:>> a écrit :
...some more clarification NEW and NEW_10 are restored from the same snap
taken from OLD.
What differs is before restoring NEW_10, I'm editing manualy number of
shards in the mapping in the snap (hdfs_repository plugin)
On Thursday, January 22, 2015 at 6:22:04 PM UTC-8, Daniel Gligorov wrote:
Hi,
Anybody knows how different number of primary shards can affect number of
docs (_count) in same index?
I mean I have read-only index OLD, did a snap (ES 1.2) of it and restored
it as NEW. Both have same number shards and docs.
Then I'm restoring another index NEW_10, with less primary shards and I'm
getting less documents count in it?
Doesn't matter how many tried I retested snap and restore, if I don't
edit number of shards I end with good counter, so wonder what messes my case
[:~] curl localhost:9200/_cat/indices/OLD,NEW,NEW_10?v
health index pri rep docs.count docs.deleted store.size
pri.store.size
green OLD 20 2 1333718 78639 15.7gb
5.2gb
green NEW 20 1 1333480 78624 10.5gb
5.2gb
green NEW_10 10 1 666064 42696 5.2gb 2.6gb
Tried simple math, (docs.count - docs.deleted) / pri, but not getting
same result
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.