2

In the old times I have written and used my own plugin 'rollindex' to handle the 'rolling' of e.g. log data. Then I've seen curator and thought that this is a good replacement as it can add and remove aliases. But how can I move aliases atomically?

According to the docs I don't think that this is possible. The docs suggest a pattern where I add two indices to one alias and then remove the older index from the alias. But this means for a small time that all writes will fail due to an ElasticSearch limitation. My rollindex plugin has an atomic move (adding+removing at the same time) where this won't happen.

How would I do this with the curator?

Community
  • 1
  • 1
Karussell
  • 17,085
  • 16
  • 97
  • 197
  • what do you mean by "moving the alias"? would you care to elaborate? – eliasah Apr 30 '15 at 09:54
  • It is indeed more 'moving the index'. And I just mean adding the new index and removing the old index from an alias **in one request** like I do here: https://github.com/karussell/elasticsearch-rollindex/blob/master/src/main/java/com/pannous/es/rollindex/RollAction.java#L281 – Karussell Apr 30 '15 at 09:57
  • curator doesn't do that! there is no zero downtime reindexing in elasticsearch – eliasah Apr 30 '15 at 10:00
  • I do not mean reindexing! I just mean this regarding the alias. And that it is possible you see from the java API that I use there :) now I need to know if that is possible with curator – Karussell Apr 30 '15 at 10:01
  • but in Java that's not atomic! it does two actions add and remove – eliasah Apr 30 '15 at 10:02
  • No, it is atomic. Trust me or read the docs ;) – Karussell Apr 30 '15 at 10:03
  • Search for 'atomic' http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html – Karussell Apr 30 '15 at 10:04
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/76624/discussion-between-eliasah-and-karussell). – eliasah Apr 30 '15 at 10:05

1 Answers1

0

This is currently not implemented. See this issue

Karussell
  • 17,085
  • 16
  • 97
  • 197