Segments Per Tier setting ignored after node restart?


(Stefan Pi-3) #1

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

--


(Radu Gheorghe) #2

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:
http://www.elasticsearch.org/guide/reference/api/admin-indices-templates.html

Best regards,
Radu

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

--


(Martijn Van Groningen) #3

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 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

--


(system) #4