# Aliasies Performance in Cluster

**URL:** <https://discuss.elastic.co/t/aliasies-performance-in-cluster/6480>\
**Category:** Elasticsearch\
**Created:** [January 24, 2012, 5:26pm UTC](https://discuss.elastic.co/t/aliasies-performance-in-cluster/6480 "2012-01-24T17:26:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![LORDs\_diakonos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lords_diakonos/32/3009_2.png) [@LORDs\_diakonos](https://discuss.elastic.co/u/LORDs_diakonos)\
**Post date:** [January 24, 2012, 5:26pm UTC](https://discuss.elastic.co/t/aliasies-performance-in-cluster/6480/1 "2012-01-24T17:26:35Z")

</div>

I have a question regarding adding/removing aliases. I am running in  
a cluster and it seems to be slow to add and remove aliases and not  
always finish  
I am running the following code [http://pastebin.com/rhrbs47V](http://pastebin.com/rhrbs47V)

is it normal for this to take a long time?

Also I notice that while that code is running I am getting a ton of  
things like this in the log until it finally times out  
INFO cluster.metadata: [dotCMS\_1] [live\_20120124102301] update\_mapping  
[content] (dynamic)

After this happens the second server came in and was able to make the  
logic fire. Our code ensures only one server in the cluster can be in  
this code at a time.

Thanks,  
Jason Tesser  
dotCMS Director, Support Services  
1-305-858-1422

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 24, 2012, 5:35pm UTC](https://discuss.elastic.co/t/aliasies-performance-in-cluster/6480/2 "2012-01-24T17:35:53Z")

</div>

Alias operations should not take a long time. Do you get a response at the  
end? (just call actionGet() without a timeout). Settings aliases will not  
cause for those update mapping to happen, but maybe once you changed it,  
index operations now hit a fresh index where new (dynamic) mapping  
definitions need to be applied?

On Tue, Jan 24, 2012 at 7:26 PM, Jason Tesser [jasontesser@gmail.com](mailto:jasontesser@gmail.com) wrote:

> I have a question regarding adding/removing aliases. I am running in  
> a cluster and it seems to be slow to add and remove aliases and not  
> always finish  
> I am running the following code [client.admin().indices().prepareAliases() .addAlias - Pastebin.com](http://pastebin.com/rhrbs47V)
> 
> is it normal for this to take a long time?
> 
> Also I notice that while that code is running I am getting a ton of  
> things like this in the log until it finally times out  
> INFO cluster.metadata: [dotCMS\_1] [live\_20120124102301] update\_mapping  
> [content] (dynamic)
> 
> After this happens the second server came in and was able to make the  
> logic fire. Our code ensures only one server in the cluster can be in  
> this code at a time.
> 
> Thanks,  
> Jason Tesser  
> dotCMS Director, Support Services  
> 1-305-858-1422

---

<div class="post-metadata">

**Author:** ![LORDs\_diakonos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lords_diakonos/32/3009_2.png) [@LORDs\_diakonos](https://discuss.elastic.co/u/LORDs_diakonos)\
**Post date:** [January 24, 2012, 5:39pm UTC](https://discuss.elastic.co/t/aliasies-performance-in-cluster/6480/3 "2012-01-24T17:39:13Z")

</div>

i got this

org.elasticsearch.ElasticSearchException: Timeout waiting for task.  
at com.dotcms.content.elasticsearch.business.ESIndexAPI.fullReindexSwitchover(ESIndexAPI.java:324)  
at com.dotmarketing.common.reindex.ReindexThread.run(ReindexThread.java:90)  
Caused by: org.elasticsearch.ElasticSearchTimeoutException: Timeout  
waiting for task.  
at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:68)  
at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:57)  
at com.dotcms.content.elasticsearch.business.ESIndexAPI.fullReindexSwitchover(ESIndexAPI.java:301)

and it didn't finish

Thanks,  
Jason Tesser  
dotCMS Director, Support Services  
1-305-858-1422

On Tue, Jan 24, 2012 at 12:35 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Alias operations should not take a long time. Do you get a response at the  
> end? (just call actionGet() without a timeout). Settings aliases will not  
> cause for those update mapping to happen, but maybe once you changed it,  
> index operations now hit a fresh index where new (dynamic) mapping  
> definitions need to be applied?

---

<div class="post-metadata">

**Author:** ![LORDs\_diakonos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lords_diakonos/32/3009_2.png) [@LORDs\_diakonos](https://discuss.elastic.co/u/LORDs_diakonos)\
**Post date:** [January 24, 2012, 5:42pm UTC](https://discuss.elastic.co/t/aliasies-performance-in-cluster/6480/4 "2012-01-24T17:42:11Z")

</div>

We are setting some dynamic mappings. Would this cause an issue with  
either adding OR removing aliases

Thanks,  
Jason Tesser  
dotCMS Director, Support Services  
1-305-858-1422

On Tue, Jan 24, 2012 at 12:39 PM, Jason Tesser [jasontesser@gmail.com](mailto:jasontesser@gmail.com) wrote:

> i got this
> 
> org.elasticsearch.ElasticSearchException: Timeout waiting for task.  
> at com.dotcms.content.elasticsearch.business.ESIndexAPI.fullReindexSwitchover(ESIndexAPI.java:324)  
> at com.dotmarketing.common.reindex.ReindexThread.run(ReindexThread.java:90)  
> Caused by: org.elasticsearch.ElasticSearchTimeoutException: Timeout  
> waiting for task.  
> at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:68)  
> at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:57)  
> at com.dotcms.content.elasticsearch.business.ESIndexAPI.fullReindexSwitchover(ESIndexAPI.java:301)
> 
> and it didn't finish
> 
> Thanks,  
> Jason Tesser  
> dotCMS Director, Support Services  
> 1-305-858-1422
> 
> On Tue, Jan 24, 2012 at 12:35 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > Alias operations should not take a long time. Do you get a response at the  
> > end? (just call actionGet() without a timeout). Settings aliases will not  
> > cause for those update mapping to happen, but maybe once you changed it,  
> > index operations now hit a fresh index where new (dynamic) mapping  
> > definitions need to be applied?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 25, 2012, 4:22pm UTC](https://discuss.elastic.co/t/aliasies-performance-in-cluster/6480/5 "2012-01-25T16:22:12Z")

</div>

The timeout you see if because you specified a timeout on the actionGet method, can you try and not set it and see what you get? (the aliases API waits for ack from all the other nodes that it has been applied, it waits by default for 10 seconds).

What do you mean by setting more mappings?

On Tuesday, January 24, 2012 at 7:42 PM, Jason Tesser wrote:

> We are setting some dynamic mappings. Would this cause an issue with  
> either adding OR removing aliases
> 
> Thanks,  
> Jason Tesser  
> dotCMS Director, Support Services  
> 1-305-858-1422
> 
> On Tue, Jan 24, 2012 at 12:39 PM, Jason Tesser \<[jasontesser@gmail.com](mailto:jasontesser@gmail.com) ([mailto:jasontesser@gmail.com](mailto:jasontesser@gmail.com))\> wrote:
> 
> > i got this
> > 
> > org.elasticsearch.ElasticSearchException: Timeout waiting for task.  
> > at com.dotcms.content.elasticsearch.business.ESIndexAPI.fullReindexSwitchover(ESIndexAPI.java:324)  
> > at com.dotmarketing.common.reindex.ReindexThread.run(ReindexThread.java:90)  
> > Caused by: org.elasticsearch.ElasticSearchTimeoutException: Timeout  
> > waiting for task.  
> > at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:68)  
> > at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:57)  
> > at com.dotcms.content.elasticsearch.business.ESIndexAPI.fullReindexSwitchover(ESIndexAPI.java:301)
> > 
> > and it didn't finish
> > 
> > Thanks,  
> > Jason Tesser  
> > dotCMS Director, Support Services  
> > 1-305-858-1422
> > 
> > On Tue, Jan 24, 2012 at 12:35 PM, Shay Banon \<[kimchy@gmail.com](mailto:kimchy@gmail.com) ([mailto:kimchy@gmail.com](mailto:kimchy@gmail.com))\> wrote:
> > 
> > > Alias operations should not take a long time. Do you get a response at the  
> > > end? (just call actionGet() without a timeout). Settings aliases will not  
> > > cause for those update mapping to happen, but maybe once you changed it,  
> > > index operations now hit a fresh index where new (dynamic) mapping  
> > > definitions need to be applied?

---

<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:41am UTC](https://discuss.elastic.co/t/aliasies-performance-in-cluster/6480/6 "2017-07-06T03:41:33Z")

</div>


