OpenSearch/server
Kartik Ganesh b902add3fa
[Segment Replication] Added source-side classes for orchestrating replication 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 <gkart@amazon.com>
2022-06-03 10:53:58 -07:00
..
licenses [Upgrade] Lucene-9.3.0-snapshot-823df23 (#3478) 2022-05-31 10:57:10 -05:00
src [Segment Replication] Added source-side classes for orchestrating replication events (#3470) 2022-06-03 10:53:58 -07:00
build.gradle Bump HdrHistogram from 2.1.9 to 2.1.12 in /server (#2135) 2022-05-05 11:30:12 -05:00