CONCEPT Cited by 1 source
Retention lease¶
A retention lease is an OpenSearch/Elasticsearch primitive that prevents the deletion of Lucene operation history (translog entries) below a specified sequence number. It guarantees that the changes snapshot remains available for replay even as normal operations (merges, translog trimming) proceed.
Role in Online Migration¶
In AOSC, each shard migration worker acquires a retention lease before beginning replay. This ensures that:
- The Lucene changes snapshot covers all operations since the backfill started.
- Segment merges and translog GC don't delete entries needed for catch-up.
- The lease is advanced as replay progresses, releasing old entries.
Without retention leases, a slow consumer could lose its position in the operation history, making consistent replay impossible.
Seen In¶
- systems/opensearch-aosc — uses retention leases to pin operation history during shard migration
- sources/2026-07-24-atlassian-online-index-migration-and-shard-scaling-in-opensearch-with-aosc
(Source: sources/2026-07-24-atlassian-online-index-migration-and-shard-scaling-in-opensearch-with-aosc)