# Segments Per Tier setting ignored after node restart?

**URL:** https://discuss.elastic.co/t/segments-per-tier-setting-ignored-after-node-restart/9355
**Category:** Elasticsearch
**Created:** [October 15, 2012, 8:23am UTC](https://discuss.elastic.co/t/segments-per-tier-setting-ignored-after-node-restart/9355 "2012-10-15T08:23:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Stefan\_Pi\_3](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@Stefan\_Pi\_3](https://discuss.elastic.co/u/Stefan_Pi_3)
#### Post date: [October 15, 2012, 8:23am UTC](https://discuss.elastic.co/t/segments-per-tier-setting-ignored-after-node-restart/9355/1 "2012-10-15T08:23:33Z")

</div>

Hi everybody,

I'm using ES 0.19.0. While the cluster was running I set the  
index.merge.policy.segments\_per\_tier setting to a new value (before it was  
the default value) dynamically for all the indices through the Update  
Settings API. After that I checked the settings of the indices and it  
indeed appeared there so seems to work fine.

Then I edited my configuration file (elasticsearch.yml) and added the same  
option there too:  
index.merge.policy.segments\_per\_tier:

After that I restarted the cluster and checked again the setting of the  
indices but the new index.merge.policy.segments\_per\_tier setting was not  
there (so it's probably using the default setting again). Did I do  
something wrong? I was expecting that all settings coming from the  
elasticsearch.yml are used automatically.

Thanks,  
Stefan

--

---

<div class="post-metadata">

### Author: ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)
#### Post date: [October 15, 2012, 10:38am UTC](https://discuss.elastic.co/t/segments-per-tier-setting-ignored-after-node-restart/9355/2 "2012-10-15T10:38:01Z")

</div>

Hi Stefan,

Configuration file aside, it's strange that the index settings didn't  
persist after restart. Can you double-check that? They might appear in a  
different order.

As for index settings not being applied from the configuration, I can also  
reproduce this on 0.19.10 with quite a lot of such settings:

# grep ^index /etc/elasticsearch/elasticsearch.yml

index.blocks.read: true

# /etc/init.d/elasticsearch restart

- Stopping Elasticsearch Server [OK]
- Starting Elasticsearch Server [OK]

# curl -XGET localhost:9200/myindex/mytype/vBK6RR0tTs-NlsVZR01DOg

{"\_index":"myindex","\_type":"mytype","\_id":"vBK6RR0tTs-NlsVZR01DOg","\_version":1,"exists":true,  
"\_source" : {"foo":"bar"}}

# curl -XPUT localhost:9200/myindex/\_settings -d '{"index.blocks.read":

true}'  
{"ok":true}

# curl -XGET localhost:9200/myindex/mytype/vBK6RR0tTs-NlsVZR01DOg

{"error":"ClusterBlockException[blocked by: [FORBIDDEN/7/index read  
(api)];]","status":403}

At this point I'm not sure whether this is how it should be. I guess you  
can always open an issue on github about it.

In any case, you have the option of using index templates to work around  
this. You can also store them in configuration and it works. Plus, you can  
update the templates from configuration without restarting Elasticsearch.  
Take a look here for details:

> **[Elastic — The Search AI Company](https://www.elastic.co)**
>
> Power insights and outcomes with The Elastic Search AI Platform. See into your data and find answers that matter with enterprise solutions designed to help you accelerate time to insight. Try Elastic ...

## Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

On Monday, October 15, 2012 11:23:33 AM UTC+3, Stefan Pi wrote:

> Hi everybody,
> 
> I'm using ES 0.19.0. While the cluster was running I set the  
> index.merge.policy.segments\_per\_tier setting to a new value (before it was  
> the default value) dynamically for all the indices through the Update  
> Settings API. After that I checked the settings of the indices and it  
> indeed appeared there so seems to work fine.
> 
> Then I edited my configuration file (elasticsearch.yml) and added the same  
> option there too:  
> index.merge.policy.segments\_per\_tier:
> 
> After that I restarted the cluster and checked again the setting of the  
> indices but the new index.merge.policy.segments\_per\_tier setting was not  
> there (so it's probably using the default setting again). Did I do  
> something wrong? I was expecting that all settings coming from the  
> elasticsearch.yml are used automatically.
> 
> Thanks,  
> Stefan

--

---

<div class="post-metadata">

### Author: ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)
#### Post date: [October 15, 2012, 10:38am UTC](https://discuss.elastic.co/t/segments-per-tier-setting-ignored-after-node-restart/9355/3 "2012-10-15T10:38:57Z")

</div>

Hi Stefan,

I don't think you did something wrong here. Previously your setting  
was stored inside the cluster metadata. Now your setting is stored in  
the elasticsearch.yml and loaded during startup. The get settings api  
only shows the settings in the cluster metadata.

Did you saved the set the 'segments\_per\_tier' option in all  
elasticsearch.yml files in your cluster? If not then only the nodes  
with the this setting will merge segments with this new value in mind.

Martijn

On 15 October 2012 10:23, Stefan Pi [pi@ubermetrics-technologies.com](mailto:pi@ubermetrics-technologies.com) wrote:

> Hi everybody,
> 
> I'm using ES 0.19.0. While the cluster was running I set the  
> index.merge.policy.segments\_per\_tier setting to a new value (before it was  
> the default value) dynamically for all the indices through the Update  
> Settings API. After that I checked the settings of the indices and it indeed  
> appeared there so seems to work fine.
> 
> Then I edited my configuration file (elasticsearch.yml) and added the same  
> option there too:  
> index.merge.policy.segments\_per\_tier:
> 
> After that I restarted the cluster and checked again the setting of the  
> indices but the new index.merge.policy.segments\_per\_tier setting was not  
> there (so it's probably using the default setting again). Did I do something  
> wrong? I was expecting that all settings coming from the elasticsearch.yml  
> are used automatically.
> 
> Thanks,  
> Stefan
> 
> --

--  
Met vriendelijke groet,

Martijn van Groningen

--

---

<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 6, 2017, 3:08am UTC](https://discuss.elastic.co/t/segments-per-tier-setting-ignored-after-node-restart/9355/4 "2017-07-06T03:08:50Z")

</div>


