# Can "action.write\_consistency" be updated dynamically on a running node?

**URL:** <https://discuss.elastic.co/t/can-action-write-consistency-be-updated-dynamically-on-a-running-node/14161>\
**Category:** Elasticsearch\
**Created:** [October 29, 2013, 9:45pm UTC](https://discuss.elastic.co/t/can-action-write-consistency-be-updated-dynamically-on-a-running-node/14161 "2013-10-29T21:45:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankush\_Jhalani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankush_jhalani/32/875_2.png) [@Ankush\_Jhalani](https://discuss.elastic.co/u/Ankush_Jhalani)\
**Post date:** [October 29, 2013, 9:45pm UTC](https://discuss.elastic.co/t/can-action-write-consistency-be-updated-dynamically-on-a-running-node/14161/1 "2013-10-29T21:45:38Z")

</div>

I tried to update it dynamically but can't.  
curl -XPUT '[http://localhost:9201/\_cluster/nodes/\_local?pretty](http://localhost:9201/_cluster/nodes/_local?pretty)' -d '  
{ "settings.action.write\_consistency" : "all" } '

{  
"error" : "IndexMissingException[[\_cluster] missing]",  
"status" : 404  
}

Is my syntax incorrect or is this setting not allowed to be set  
dynamically?? This will be useful for a planned maintenance where you know  
that number of nodes is going to be below quorum.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![javanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javanna/32/4698_2.png) [@javanna](https://discuss.elastic.co/u/javanna)\
**Post date:** [October 30, 2013, 1:31pm UTC](https://discuss.elastic.co/t/can-action-write-consistency-be-updated-dynamically-on-a-running-node/14161/2 "2013-10-30T13:31:21Z")

</div>

You can specify the write\_consistency in each of your write request (e.g.  
index api) using the "consistency" parameter.

You can also override the default value (quorum) for it but that is not a  
dynamic settings. You would need to add the "action.write\_consistency"  
setting to your configuration on each node and restart.

By the way even if it was a dynamic settings, you should have used the cluster  
update settings api[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-update-settings.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-update-settings.html),  
thus a PUT to localhost:9200/\_cluster/settings.

On Tuesday, October 29, 2013 10:45:38 PM UTC+1, Ankush Jhalani wrote:

> I tried to update it dynamically but can't.  
> curl -XPUT '[http://localhost:9201/\_cluster/nodes/\_local?pretty](http://localhost:9201/_cluster/nodes/_local?pretty)' -d '  
> { "settings.action.write\_consistency" : "all" } '
> 
> {  
> "error" : "IndexMissingException[[\_cluster] missing]",  
> "status" : 404  
> }
> 
> Is my syntax incorrect or is this setting not allowed to be set  
> dynamically?? This will be useful for a planned maintenance where you know  
> that number of nodes is going to be below quorum.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ankush\_Jhalani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankush_jhalani/32/875_2.png) [@Ankush\_Jhalani](https://discuss.elastic.co/u/Ankush_Jhalani)\
**Post date:** [October 30, 2013, 6:01pm UTC](https://discuss.elastic.co/t/can-action-write-consistency-be-updated-dynamically-on-a-running-node/14161/3 "2013-10-30T18:01:35Z")

</div>

Thanks for clarifying

Having to always pass the write\_consistency for every index/delete request  
sounds like overkill. I think there is valid use-case for supporting this  
setting dynamically to handle situations when some machines are knowingly  
down for whatever reasons and we want to temporarily switch from quorum to  
one.

Regarding the URL, I thought this was a node level setting so didn't expect  
the URL to be cluster settings update(even though it's a moot point since  
it's not a dynamic setting.)

On Tuesday, October 29, 2013 5:45:38 PM UTC-4, Ankush Jhalani wrote:

> I tried to update it dynamically but can't.  
> curl -XPUT '[http://localhost:9201/\_cluster/nodes/\_local?pretty](http://localhost:9201/_cluster/nodes/_local?pretty)' -d '  
> { "settings.action.write\_consistency" : "all" } '
> 
> {  
> "error" : "IndexMissingException[[\_cluster] missing]",  
> "status" : 404  
> }
> 
> Is my syntax incorrect or is this setting not allowed to be set  
> dynamically?? This will be useful for a planned maintenance where you know  
> that number of nodes is going to be below quorum.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [October 30, 2013, 8:05pm UTC](https://discuss.elastic.co/t/can-action-write-consistency-be-updated-dynamically-on-a-running-node/14161/4 "2013-10-30T20:05:39Z")

</div>

You do not need to change the default "quorum" value to "one" for write  
consistency, unless you want to disable it completely. "quorum" takes the  
current number of active shards into consideration, also in situations  
where you stop nodes temporarily.

Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ankush\_Jhalani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankush_jhalani/32/875_2.png) [@Ankush\_Jhalani](https://discuss.elastic.co/u/Ankush_Jhalani)\
**Post date:** [October 31, 2013, 5:07pm UTC](https://discuss.elastic.co/t/can-action-write-consistency-be-updated-dynamically-on-a-running-node/14161/5 "2013-10-31T17:07:26Z")

</div>

In a 4 node environment with shard having 3 replica, bringing down 2 nodes  
blocks index/delete operations. Thus I don't understand how quorum is  
taking active shards here into consideration (I am assuming active shards  
mean which are currently running, which would be 2 in this scenario).

On Tuesday, October 29, 2013 5:45:38 PM UTC-4, Ankush Jhalani wrote:

> I tried to update it dynamically but can't.  
> curl -XPUT '[http://localhost:9201/\_cluster/nodes/\_local?pretty](http://localhost:9201/_cluster/nodes/_local?pretty)' -d '  
> { "settings.action.write\_consistency" : "all" } '
> 
> {  
> "error" : "IndexMissingException[[\_cluster] missing]",  
> "status" : 404  
> }
> 
> Is my syntax incorrect or is this setting not allowed to be set  
> dynamically?? This will be useful for a planned maintenance where you know  
> that number of nodes is going to be below quorum.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [October 31, 2013, 5:38pm UTC](https://discuss.elastic.co/t/can-action-write-consistency-be-updated-dynamically-on-a-running-node/14161/6 "2013-10-31T17:38:25Z")

</div>

If you run 2 nodes with replica level 3 for a long time, you can decrease  
replica level to 1. After re-adding nodes, you can increase replica level  
again.

Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ankush\_Jhalani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankush_jhalani/32/875_2.png) [@Ankush\_Jhalani](https://discuss.elastic.co/u/Ankush_Jhalani)\
**Post date:** [November 1, 2013, 4:28pm UTC](https://discuss.elastic.co/t/can-action-write-consistency-be-updated-dynamically-on-a-running-node/14161/7 "2013-11-01T16:28:22Z")

</div>

Agreed, and that's what we did but this is not ideal. When the node comes  
back online all indices need to be re-synced completely. For big indices it  
can take a lot time.

On Tuesday, October 29, 2013 5:45:38 PM UTC-4, Ankush Jhalani wrote:

> I tried to update it dynamically but can't.  
> curl -XPUT '[http://localhost:9201/\_cluster/nodes/\_local?pretty](http://localhost:9201/_cluster/nodes/_local?pretty)' -d '  
> { "settings.action.write\_consistency" : "all" } '
> 
> {  
> "error" : "IndexMissingException[[\_cluster] missing]",  
> "status" : 404  
> }
> 
> Is my syntax incorrect or is this setting not allowed to be set  
> dynamically?? This will be useful for a planned maintenance where you know  
> that number of nodes is going to be below quorum.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:09am UTC](https://discuss.elastic.co/t/can-action-write-consistency-be-updated-dynamically-on-a-running-node/14161/8 "2017-07-06T02:09:18Z")

</div>


