Hello Team:
I am using Elasticsearch version 7.8.0..
I am using Index Settings :
index.blocks.read_only_allow_delete: true
for my indices ...
If i run a CURL command to update my index settings
curl -X PUT "localhost:9200/my-index-000001/_settings?pretty" -H 'Content-Type: application/json' -d'
{
"index" : {
"refresh_interval" : "-1"
}
}
'
Operation is perform successfully
It removed my existing Index settings of "index.blocks.read_only_allow_delete: true
"
could you please help me to understand why is this behaviour.
The docs for index.blocks.read_only_allow_delete
say:
IMPORTANT : Elasticsearch adds and removes the read-only index block automatically when the disk utilization falls below the high watermark.
Hi David
I did read the doc , before raising it in here ..
I am not having DISK utilization issue .. i am having ample amount of space.
its automatically removed when i am adding above said settings for my index.
Let me put an example in here ...
My Index Settings :
{
"myindex-2020.02.19" : {
"settings" : {
"index" : {
"codec" : "best_compression",
"routing" : {
"allocation" : {
"require" : {
"box_type" : "warm"
}
}
},
"number_of_shards" : "5",
"blocks" : {
"read_only_allow_delete" : "true"
},
"provided_name" : "myindex-2020.02.19",
"creation_date" : "1628563570323",
"number_of_replicas" : "1",
"uuid" : "DmhmKaqnS1mjfBs5fpNX7Q",
"version" : {
"created" : "7080099"
}
}
}
}
}
Now I am changing particualr settings only :
curl -X PUT "localhost:9200/myindex-2020.02.19/_settings?pretty" -H 'Content-Type: application/json' -d'
{
"index" : {
"refresh_interval" : "-1",
"number_of_replicas" : 0
}
}' -u elastic
{
"acknowledged" : true
}
Now see the setting of READ ONLY is gone ...
curl -XGET "localhost:9200/myindex-2020.02.19/_settings?pretty" -u elastic
{
"myindex-2020.02.19" : {
"settings" : {
"index" : {
"codec" : "best_compression",
"routing" : {
"allocation" : {
"require" : {
"box_type" : "warm"
}
}
},
"refresh_interval" : "-1",
"number_of_shards" : "5",
"provided_name" : "myindex-2020.02.19",
"creation_date" : "1628563570323",
"number_of_replicas" : "0",
"uuid" : "DmhmKaqnS1mjfBs5fpNX7Q",
"version" : {
"created" : "7080099"
}
}
}
}
}
Quoting those docs again with emphasis added:
This looks like the expected behaviour to me.
So its like whenever we change Index settings , its likely and expected that READ ONLY settings would be removed .. irrespective of DISK UTILIZATION issue...
That is that you are Emphasising ?
system
(system)
Closed
September 7, 2021, 7:36am
9
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.