diff --git a/server/src/main/java/org/opensearch/index/IndexService.java b/server/src/main/java/org/opensearch/index/IndexService.java index 7afc6d24cddde..e39d66d57e99b 100644 --- a/server/src/main/java/org/opensearch/index/IndexService.java +++ b/server/src/main/java/org/opensearch/index/IndexService.java @@ -498,10 +498,9 @@ public synchronized IndexShard createShard( Directory remoteDirectory = remoteDirectoryFactory.newDirectory(this.indexSettings, path); remoteStore = new Store(shardId, this.indexSettings, remoteDirectory, lock, Store.OnClose.EMPTY, path); } else { - logger.info("Hitting the migration case"); if (sourceNode != null && sourceNode.isRemoteStoreNode() == false) { assert routing.primary(); - logger.info("Hitting the migration case where we need to seed remote store"); + logger.info("DocRep shard {} is migrating to remote", shardId); seedRemote = true; } RemoteSegmentStoreDirectoryFactory directoryFactory = new RemoteSegmentStoreDirectoryFactory( diff --git a/server/src/main/java/org/opensearch/index/shard/IndexShard.java b/server/src/main/java/org/opensearch/index/shard/IndexShard.java index d01ca1fa46153..351c4ac5e63f5 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShard.java @@ -4000,10 +4000,10 @@ public boolean isStartedPrimary() { } public boolean enableUploadToRemoteTranslog() { - return isStartedPrimary() || (shouldSeedRemoteStore() && hasOneSyncHappened()); + return isStartedPrimary() || (shouldSeedRemoteStore() && hasOneRemoteSegmentSyncHappened()); } - private boolean hasOneSyncHappened() { + private boolean hasOneRemoteSegmentSyncHappened() { assert indexSettings.isRemoteNode(); // We upload remote translog only after one remote segment upload in case of migration RemoteSegmentStoreDirectory rd = getRemoteDirectory(); @@ -4814,7 +4814,6 @@ public ParsedDocument newNoopTombstoneDoc(String reason) { * Rollback the current engine to the safe commit, then replay local translog up to the global checkpoint. */ void resetEngineToGlobalCheckpoint() throws IOException { - logger.info("Reseting to global checkpoint"); assert Thread.holdsLock(mutex) == false : "resetting engine under mutex"; assert getActiveOperationsCount() == OPERATIONS_BLOCKED : "resetting engine without blocking operations; active operations are [" + getActiveOperations() diff --git a/server/src/main/java/org/opensearch/indices/IndicesService.java b/server/src/main/java/org/opensearch/indices/IndicesService.java index f452043e62e2c..dc74db2fa1ca9 100644 --- a/server/src/main/java/org/opensearch/indices/IndicesService.java +++ b/server/src/main/java/org/opensearch/indices/IndicesService.java @@ -539,7 +539,6 @@ private static BiFunction getTrans remoteStoreStatsTrackerFactory.getRemoteTranslogTransferTracker(shardRouting.shardId()) ); } else if (isRemoteStoreAttributePresent(settings) && shardRouting.primary()) { - logger.info("Hitting the migration case for translogs "); return new RemoteBlobStoreInternalTranslogFactory( repositoriesServiceSupplier, threadPool, diff --git a/server/src/main/java/org/opensearch/indices/recovery/RecoverySourceHandler.java b/server/src/main/java/org/opensearch/indices/recovery/RecoverySourceHandler.java index ce1196094ea4a..2434efb241f5f 100644 --- a/server/src/main/java/org/opensearch/indices/recovery/RecoverySourceHandler.java +++ b/server/src/main/java/org/opensearch/indices/recovery/RecoverySourceHandler.java @@ -845,7 +845,6 @@ void finalizeRecovery(long targetLocalCheckpoint, long trimAboveSeqNo, ActionLis || (request.sourceNode().isRemoteStoreNode() && request.targetNode().isRemoteStoreNode()) ? recoveryTarget::forceSegmentFileSync : () -> {}; - // ToDo : Do we need a new action to replay translog here ? // TODO: make relocated async // this acquires all IndexShard operation permits and will thus delay new recoveries until it is done