[Remote Store] Handle translog upload during primary to primary relocation for remote-backed indexes #5795
Labels
enhancement
Enhancement or improvement to existing feature or request
Storage:Durability
Issues and PRs related to the durability framework
v2.6.0
'Issues and PRs related to version v2.6.0'
Is your feature request related to a problem? Please describe.
Currently, when peer recovery happens for primary-primary relocation, both the older & newer primary bootstraps engine and translog such that the upload happens from both the shards.
Following things need to be ensured -
index.translog.durability
is set asasync
, the translog sync happens everyindex.translog.sync_interval
periodically. With this change, we decide to upload translog to remote store basis the primary mode. Since translog sync is async, in current status quo state, the upload is not determinstic to happen before primaryMode is marked as false. We need to ensure that the upload happens (successfully or it fails) deterministically before the primaryMode turns false on the old primary and before the new primary resets the engine (resetToWriteableEngine
).There is possible issue with data loss in relocation flow for seg rep based indexes. Issue - #5848
Describe the solution you'd like
Since the complete handoff process ensures that the primary mode switch happens such that the any inflight request in older primary is first drained off and then the newer primary gets promoted with primary mode set to true as part of handoff.
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.
The text was updated successfully, but these errors were encountered: