I have a question regarding the retention lease period when it comes to CCR.
So, usually the proper way to set this lease period is to do it on index creation time.
Recently we noticed, that this property is also configurable during runtime. On the other hand, the soft_deletes are not configurable at runtime at all.
So my question is, is it actually possible to configure the retention lease period at runtime or is this some kind wrong behavior?
Yes, it's possible to adjust the retention lease period at runtime, and this was a deliberate decision. If your CCR follower fails and you know in advance that it will take ≥12h to bring it back online then you can increase the lease period to retain history for longer so that the followers can catch up when eventually they recover. (edit, removed a sentence here about reducing the retention lease period, see my next post...)
Important correction: the history retained by retention leases is also used for fast replica recoveries in more recent versions (≥7.4.0) so setting the retention period to zero is a bad idea. Sorry for the confusion.
Um, I just mean recovering replicas quickly. It's not the name of a feature or anything like that
Since 6.0 Elasticsearch has been able to recover replicas quickly by replaying history thanks to sequence numbers. From 7.4.0 onwards we use retention leases to make sure we keep that history around, much like we do for CCR.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.