# Is alias renameing operation atomic?

**URL:** <https://discuss.elastic.co/t/is-alias-renameing-operation-atomic/12276>\
**Category:** Elasticsearch\
**Created:** [June 5, 2013, 8:59am UTC](https://discuss.elastic.co/t/is-alias-renameing-operation-atomic/12276 "2013-06-05T08:59:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![haizaar](https://avatars.discourse-cdn.com/v4/letter/h/3d9bf3/32.png) [@haizaar](https://discuss.elastic.co/u/haizaar)\
**Post date:** [June 5, 2013, 8:59am UTC](https://discuss.elastic.co/t/is-alias-renameing-operation-atomic/12276/1 "2013-06-05T08:59:01Z")

</div>

Hello everyone!

I would like to know if the following alias renaming operation is atomic?

curl -XPOST '[http://localhost:9200/\_aliases](http://localhost:9200/_aliases)' -d '  
{  
"actions" : [  
{ "remove" : { "index" : "test1", "alias" : "alias1" } },  
{ "add" : { "index" : "test1", "alias" : "alias2" } }  
]  
}'

I would to make sure that would not be a moment where no alias will be  
available for test1 index at all?

Thanks,  
Zaar

--  
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:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 5, 2013, 2:36pm UTC](https://discuss.elastic.co/t/is-alias-renameing-operation-atomic/12276/2 "2013-06-05T14:36:08Z")

</div>

Yes, all the actions will occur at the same time.

--  
Ivan

On Wed, Jun 5, 2013 at 1:59 AM, Zaar Hai [haizaar@gmail.com](mailto:haizaar@gmail.com) wrote:

> Hello everyone!
> 
> I would like to know if the following alias renaming operation is atomic?
> 
> curl -XPOST '[http://localhost:9200/\_aliases](http://localhost:9200/_aliases)' -d '  
> {  
> "actions" : [  
> { "remove" : { "index" : "test1", "alias" : "alias1" } },  
> { "add" : { "index" : "test1", "alias" : "alias2" } }  
> ]  
> }'
> 
> I would to make sure that would not be a moment where no alias will be  
> available for test1 index at all?
> 
> Thanks,  
> Zaar
> 
> --  
> 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).

--  
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:32am UTC](https://discuss.elastic.co/t/is-alias-renameing-operation-atomic/12276/3 "2017-07-06T02:32:47Z")

</div>


