Skip to content

[Remote Store Migration] Relocation of primary shards from doc rep to remote store node #12689

@gbbafna

Description

@gbbafna

Is your feature request related to a problem? Please describe

Relocation of primary shards from doc rep to remote store node needs to seed the remote store.

Describe the solution you'd like

Sequence of relocation from doc rep to remote node

  1. Uses file based recovery to copy all segments from docrep primary - phase1 of the recovery
  2. Prepares the translog for writes -
    1. Upload all the segments to remote
    2. Open Internal Engine and RemoteFSTranslog here. Pretend that primaryMode is true for RemoteFSTranslog , as we want to persist new writes from now on .
  3. Post this, initiates tracking of the shard - add shard to replication group (shard will receive replication requests from this point on) now that engine is open. This means that any document indexed into the primary after this will be replicated to this replica as well. .
    1. Remote Segment Store - Will keep uploading segments to remote store
    2. Remote Translog Store - New documents will create new translog , will get uploaded to remote translog store.
  4. phase2 - Copies over the data between what file based recovery has and the point from where writes go to replica as well .
  5. Finalize the recovery - Drains the writes on old node . Does a force segrep , activates primary mode on new node Switches off engine etc .

Related component

Storage:Durability

Describe alternatives you've considered

NA

Additional context

NA

Metadata

Metadata

Assignees

Labels

Storage:DurabilityIssues and PRs related to the durability frameworkenhancementEnhancement or improvement to existing feature or request

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions