Elasticsearch indexing while rollover


#1

I have an application which writes to the ES and which also schedules time based index rollover based on max_docs condition.

  1. What will happen if I try indexing during the rollover ?
  2. Does ES takes lock while performing rollover ?
  3. On an average how much time does it take to rollover the index ? Acc. to me this shouldn't take much time as time based index rollover is just creating a new index and pointing the alias to it.

ES version 5.5.1


(David Pilato) #2

Remember that you are sending your index operation to an alias.

What happens when you rollover:

  • It creates a new index (You are still indexing to the old index through the alias)
  • It switches the alias. This switch is super fast. If you have a pending operation it might go to the old index.

Once done, the new requests will go to the new index.

There is no lock.


Dec 25th, 2017: [EN][Elastic Stack] Stocking Stuffers - AKA Protips from the Source!
(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.