Configurable retention lease period when it comes to CCR

Hello everyone!

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?

Thanks in advance!

Edit: Oh, we are running ES 6.8.1

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...)

1 Like

Thank you for clarifying David :slight_smile:

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.

Hmm, what exactly is "fast replica recovery"? Can't find anything related to that...

Um, I just mean recovering replicas quickly. It's not the name of a feature or anything like that :grin:

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.

1 Like