-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Is your feature request related to a problem? Please describe.
PRRL is used to keep lucene operation history and is also used in recovery for replaying these operations once the segment files are sent to the target. During replica recovery, PRRL is acquired for sending these operations to the replica after the segment files (from most recent safe commit) are copied over to replicas. This is not required when remote translog is enabled.
Points to take care -
- Currently, PRRL leases are updated on account of global checkpoints getting updated. RetentionLeaseSyncAction is further used to sync retention leases to the replicas. With segment replication, while the retention leases would exist in ReplicationTracker, there would not be actual lucene operations present within the replica shard. Adding on to this, with remote translog, the recovery of replicas would always be filebased recovery without any replay of translog (lucene opeartions). The proposal would be to update retention leases on primary basis the primary's local checkpoint or any intentionally acquired locks. The PRRLs would still be needed for primary-primary replication.
- PRRL creation/deletion is not required as the replicas do not hold the lucene history going forward.
Describe the solution you'd like
Remove PRRL from replica recovery code.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.