# Index created by shrink donnot has sync id, and es node restart always copy from primary other than recovery from local

**URL:** <https://discuss.elastic.co/t/index-created-by-shrink-donnot-has-sync-id-and-es-node-restart-always-copy-from-primary-other-than-recovery-from-local/105988>\
**Category:** Elasticsearch\
**Created:** [November 1, 2017, 6:49am UTC](https://discuss.elastic.co/t/index-created-by-shrink-donnot-has-sync-id-and-es-node-restart-always-copy-from-primary-other-than-recovery-from-local/105988 "2017-11-01T06:49:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gangxiong\_chen](https://avatars.discourse-cdn.com/v4/letter/g/87869e/32.png) [@gangxiong\_chen](https://discuss.elastic.co/u/gangxiong_chen)\
**Post date:** [November 1, 2017, 6:49am UTC](https://discuss.elastic.co/t/index-created-by-shrink-donnot-has-sync-id-and-es-node-restart-always-copy-from-primary-other-than-recovery-from-local/105988/1 "2017-11-01T06:49:09Z")

</div>

es version : 5.2.2

- create index : index-name and index some data

ordinary index

```auto
GET index-name/_stats/?level=shards

```

```auto
"commit": {
              "id": "jnPwdaydlNfju6jJXCUhxA==",
              "generation": 8,
              "user_data": {
                "translog_uuid": "WJH9_RACSDK6b-Rwd-jLDA",
                "sync_id": "AV91knYndKR8jYwDuHVh",
                "translog_generation": "1"
              },
              "num_docs": 757005
}

```

- then shrink the index to generator a new index: read\_index-name

```auto
POST index-name/_shrink/read_index-name
{
}

```

- index from shrink

```auto
GET read_index-name/_stats/?level=shards

```

```auto
"commit": {
              "id": "qx4BsoFpMBjxPQWbqeaLqQ==",
              "generation": 4,
              "user_data": {
                "translog_generation": "1",
                "translog_uuid": "_6EUUgehRky_wGjIvCqHkw"
              },
              "num_docs": 4526847
            }

```

- restart a node
- I got some log from es server

```auto
[2017-11-01T14:31:50,861][TRACE][o.e.i.r.PeerRecoverySourceService] [node-73-test] [index-name-20171101-000002][2] skipping [phase1] to {node-71-test}{VmZsAhrkTO6iL5jF748yGw}{wtAm1iM5S5yDjKup2VlDAQ}{10.40.2.71}{10.40.2.71:9300}{tag=hot} - identical sync id [AV91ko8tIFze9QM_1Gbj] found on both source and target

```

```auto

[2017-11-01T14:31:51,011][TRACE][o.e.i.r.PeerRecoverySourceService] [node-73-test] [read_index-name-20171101-000002][0] recovery [phase1] to {node-71-test}{VmZsAhrkTO6iL5jF748yGw}{wtAm1iM5S5yDjKup2VlDAQ}{10.40.2.71}{10.40.2.71:9300}{tag=hot}: not recovering [_1s.cfe], exists in local store and has checksum [1jimtv], size [405]
[2017-11-01T14:31:51,011][TRACE][o.e.i.r.PeerRecoverySourceService] [node-73-test] [read_index-name-20171101-000002][0] recovery [phase1] to {node-71-test}{VmZsAhrkTO6iL5jF748yGw}{wtAm1iM5S5yDjKup2VlDAQ}{10.40.2.71}{10.40.2.71:9300}{tag=hot}: not recovering [_1s.si], exists in local store and has checksum [1ha8n45], size [375]
[2017-11-01T14:31:51,011][TRACE][o.e.i.r.PeerRecoverySourceService] [node-73-test] [read_index-name-20171101-000002][0] recovery [phase1] to {node-71-test}{VmZsAhrkTO6iL5jF748yGw}{wtAm1iM5S5yDjKup2VlDAQ}{10.40.2.71}{10.40.2.71:9300}{tag=hot}: not recovering [_1s.cfs], exists in local store and has checksum [1kywiow], size [524352]
[2017-11-01T14:31:51,011][TRACE][o.e.i.r.PeerRecoverySourceService] [node-73-test] [read_index-name-20171101-000002][0] recovery [phase1] to 

```

I tried some times. the index-name always recovery from local, and read\_index-name always recovery from remote.

Can I to avoid the shrinked index to recovery from remove？ Any advice will be great!

And how can I find a index that recovery from local or remote from CURL request , other than from es server TRACE log?

---

<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:** [November 29, 2017, 6:49am UTC](https://discuss.elastic.co/t/index-created-by-shrink-donnot-has-sync-id-and-es-node-restart-always-copy-from-primary-other-than-recovery-from-local/105988/2 "2017-11-29T06:49:12Z")

</div>

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