Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ public IndexShard(
final ClusterApplierService clusterApplierService
) throws IOException {
super(shardRouting.shardId(), indexSettings);

assert shardRouting.initializing();
this.shardRouting = shardRouting;
final Settings settings = indexSettings.getSettings();
Expand Down Expand Up @@ -4079,12 +4080,21 @@ private EngineConfig newEngineConfig(LongSupplier globalCheckpointSupplier) thro
}

if (isRemoteStoreEnabled() || isMigratingToRemote()) {

final RemoteUploaderService remoteUploaderService = new RemoteUploaderService(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define this as a singletone maybe?

this,
this.checkpointPublisher,
remoteStoreStatsTrackerFactory.getRemoteSegmentTransferTracker(shardId()),
remoteStoreSettings
);

internalRefreshListener.add(
new RemoteStoreRefreshListener(
this,
this.checkpointPublisher,
remoteStoreStatsTrackerFactory.getRemoteSegmentTransferTracker(shardId()),
remoteStoreSettings
remoteStoreSettings,
remoteUploaderService
)
);
}
Expand Down
Loading
Loading