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

[Backport 2.x] [Segment Replication] Added source-side classes for orchestrating replication events #4096

Closed
wants to merge 1 commit into from

Commits on Aug 2, 2022

  1. [Segment Replication] Added source-side classes for orchestrating rep…

    …lication events (#3470)
    
    This change expands on the existing SegmentReplicationSource interface and its corresponding Factory class by introducing an implementation where the replication source is a primary shard (PrimaryShardReplicationSource). These code paths execute on the target. The primary shard implementation creates the requests to be send to the source/primary shard.
    
    Correspondingly, this change also defines two request classes for the GET_CHECKPOINT_INFO and GET_SEGMENT_FILES requests as well as an abstract superclass.
    
    A CopyState class has been introduced that captures point-in-time, file-level details from an IndexShard. This implementation mirrors Lucene's NRT CopyState implementation.
    
    Finally, a service class has been introduce for segment replication that runs on the source side (SegmentReplicationSourceService) which handles these two types of incoming requests. This includes private handler classes that house the logic to respond to these requests, with some functionality stubbed for now. The service class also uses a simple map to cache CopyState objects that would be needed by replication targets.
    
    Unit tests have been added/updated for all new functionality.
    
    Signed-off-by: Kartik Ganesh <[email protected]>
    (cherry picked from commit b902add)
    kartg authored and github-actions[bot] committed Aug 2, 2022
    Configuration menu
    Copy the full SHA
    7e7cb66 View commit details
    Browse the repository at this point in the history