From 97521588d1553ac049ff67507025b68d9b7fd83e Mon Sep 17 00:00:00 2001 From: Kartik Ganesh Date: Mon, 25 Apr 2022 14:46:15 -0700 Subject: [PATCH 1/7] Moving RecoveryState.Index to a top-level class and renaming This class is a building block of replication and will be re-used between peer recovery and segment replication. Thus, the inner class has been extracted to a top-level class and moved to the replication.common package. It has been renamed to ReplicationLuceneIndex to better reflect what it represents. It has two dependent inner classes from RecoveryState that have also been moved along with it - these remain inner classes since they are not currently used anywhere else. The RecoveryFilesDetails class has been renamed to FilesDetails and the FileDetail class has been renamed to FileMetadata. Signed-off-by: Kartik Ganesh --- .idea/inspectionProfiles/Project_Default.xml | 1 + .../gateway/RecoveryFromGatewayIT.java | 5 +- .../indices/recovery/IndexRecoveryIT.java | 3 +- .../opensearch/index/shard/StoreRecovery.java | 13 +- .../indices/recovery/MultiFileWriter.java | 5 +- .../recovery/PeerRecoveryTargetService.java | 5 +- .../indices/recovery/RecoveryState.java | 502 +---------------- .../indices/recovery/RecoveryTarget.java | 3 +- .../common/ReplicationLuceneIndex.java | 523 ++++++++++++++++++ .../index/shard/IndexShardTests.java | 3 +- .../index/shard/StoreRecoveryTests.java | 8 +- .../recovery/RecoverySourceHandlerTests.java | 5 +- .../indices/recovery/RecoveryTargetTests.java | 60 +- .../repositories/fs/FsRepositoryTests.java | 5 +- .../action/cat/RestRecoveryActionTests.java | 3 +- 15 files changed, 599 insertions(+), 545 deletions(-) create mode 100644 server/src/main/java/org/opensearch/indices/replication/common/ReplicationLuceneIndex.java diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 5cf789707c58c..31b69443f454c 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -2,6 +2,7 @@