From b8b42edb8815d3463bca8ba5a069ee06d2ee0c9a Mon Sep 17 00:00:00 2001 From: Ashish Singh Date: Wed, 4 Sep 2024 17:34:25 +0530 Subject: [PATCH] Fix breaking changes Signed-off-by: Ashish Singh --- .../RemoteSegmentStoreDirectoryFactory.java | 5 +++++ .../RemoteStoreLockManagerFactory.java | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/server/src/main/java/org/opensearch/index/store/RemoteSegmentStoreDirectoryFactory.java b/server/src/main/java/org/opensearch/index/store/RemoteSegmentStoreDirectoryFactory.java index 1cd2f876c2257..85b3f25d950ef 100644 --- a/server/src/main/java/org/opensearch/index/store/RemoteSegmentStoreDirectoryFactory.java +++ b/server/src/main/java/org/opensearch/index/store/RemoteSegmentStoreDirectoryFactory.java @@ -44,6 +44,11 @@ public class RemoteSegmentStoreDirectoryFactory implements IndexStorePlugin.Dire private final ThreadPool threadPool; + // Added for passing breaking change check + public RemoteSegmentStoreDirectoryFactory(Supplier repositoriesService, ThreadPool threadPool) { + this(repositoriesService, threadPool, null); + } + public RemoteSegmentStoreDirectoryFactory( Supplier repositoriesService, ThreadPool threadPool, diff --git a/server/src/main/java/org/opensearch/index/store/lockmanager/RemoteStoreLockManagerFactory.java b/server/src/main/java/org/opensearch/index/store/lockmanager/RemoteStoreLockManagerFactory.java index ed88531a34446..26d1f26188ecd 100644 --- a/server/src/main/java/org/opensearch/index/store/lockmanager/RemoteStoreLockManagerFactory.java +++ b/server/src/main/java/org/opensearch/index/store/lockmanager/RemoteStoreLockManagerFactory.java @@ -33,6 +33,12 @@ public class RemoteStoreLockManagerFactory { private final Supplier repositoriesService; private final String segmentsPathFixedPrefix; + // Added for passing breaking change check + public RemoteStoreLockManagerFactory(Supplier repositoriesService) { + this.repositoriesService = repositoriesService; + this.segmentsPathFixedPrefix = null; + } + public RemoteStoreLockManagerFactory(Supplier repositoriesService, String segmentsPathFixedPrefix) { this.repositoriesService = repositoriesService; this.segmentsPathFixedPrefix = segmentsPathFixedPrefix; @@ -47,6 +53,17 @@ public RemoteStoreLockManager newLockManager( return newLockManager(repositoriesService.get(), repositoryName, indexUUID, shardId, pathStrategy, segmentsPathFixedPrefix); } + // Added for passing breaking change check + public static RemoteStoreMetadataLockManager newLockManager( + RepositoriesService repositoriesService, + String repositoryName, + String indexUUID, + String shardId, + RemoteStorePathStrategy pathStrategy + ) { + return newLockManager(repositoriesService, repositoryName, indexUUID, shardId, pathStrategy, null); + } + public static RemoteStoreMetadataLockManager newLockManager( RepositoriesService repositoriesService, String repositoryName,