OpenSearch icon indicating copy to clipboard operation
OpenSearch copied to clipboard

[Remote Store] Remove acquire PRRL during replica recovery if remote translog is enabled

Open ashking94 opened this issue 3 years ago • 0 comments

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.

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.

ashking94 avatar Sep 14 '22 10:09 ashking94