Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Segment Replication]. Implement peer copy as a source of replication. #3322

Closed
Tracked by #2355
mch2 opened this issue May 13, 2022 · 1 comment · Fixed by #3525
Closed
Tracked by #2355

[Segment Replication]. Implement peer copy as a source of replication. #3322

mch2 opened this issue May 13, 2022 · 1 comment · Fixed by #3525
Assignees

Comments

@mch2
Copy link
Member

mch2 commented May 13, 2022

Segrep needs a service and handlers similar to PeerRecoveryTargetService to manage copying of segments between replicas and primaries.

The service should first fetch the latest checkpoint metadata from a primary shard and then kick off sending of segments back to the replica.

This is similar to the PrimaryShardReplicationSource code written as part of the POC. This POC code has a lot of duplication with PeerRecoveryTargetService, particularly in the endpoint to copy file chunks.

We will also need a service similar to PeerRecoverySourceService that handles requests from replicas. With Segment replication this source service would handle requests for new checkpoints (GET_CHECKPOINT in poc) and a handler for a request for files to be copied (GET_FILES in poc). Once a checkpoint request is received we need to incref the requested segments to ensure they are not merged away during a copy. The GET_FILES endpoint would start a copy process back to replicas, sending file chunks.

@mch2
Copy link
Member Author

mch2 commented May 23, 2022

#3409 lays out a way to do this on the target side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants