@@ -250,17 +250,6 @@ public class IndicesService extends AbstractLifecycleComponent
250
250
Property .Final
251
251
);
252
252
253
- /**
254
- * Used to specify the default translog buffer interval for remote store backed indexes.
255
- */
256
- public static final Setting <TimeValue > CLUSTER_REMOTE_TRANSLOG_BUFFER_INTERVAL_SETTING = Setting .timeSetting (
257
- "cluster.remote_store.translog.buffer_interval" ,
258
- IndexSettings .DEFAULT_REMOTE_TRANSLOG_BUFFER_INTERVAL ,
259
- IndexSettings .MINIMUM_REMOTE_TRANSLOG_BUFFER_INTERVAL ,
260
- Property .NodeScope ,
261
- Property .Dynamic
262
- );
263
-
264
253
/**
265
254
* This setting is used to set the refresh interval when the {@code index.refresh_interval} index setting is not
266
255
* provided during index creation or when the existing {@code index.refresh_interval} index setting is set as null.
@@ -355,7 +344,7 @@ public class IndicesService extends AbstractLifecycleComponent
355
344
private volatile boolean idFieldDataEnabled ;
356
345
private volatile boolean allowExpensiveQueries ;
357
346
private final RecoverySettings recoverySettings ;
358
-
347
+ private final RemoteStoreSettings remoteStoreSettings ;
359
348
@ Nullable
360
349
private final OpenSearchThreadPoolExecutor danglingIndicesThreadPoolExecutor ;
361
350
private final Set <Index > danglingIndicesToWrite = Sets .newConcurrentHashSet ();
@@ -364,8 +353,6 @@ public class IndicesService extends AbstractLifecycleComponent
364
353
private final IndexStorePlugin .DirectoryFactory remoteDirectoryFactory ;
365
354
private final BiFunction <IndexSettings , ShardRouting , TranslogFactory > translogFactorySupplier ;
366
355
private volatile TimeValue clusterDefaultRefreshInterval ;
367
- private volatile TimeValue clusterRemoteTranslogBufferInterval ;
368
-
369
356
private final SearchRequestStats searchRequestStats ;
370
357
371
358
@ Override
@@ -400,7 +387,8 @@ public IndicesService(
400
387
SearchRequestStats searchRequestStats ,
401
388
@ Nullable RemoteStoreStatsTrackerFactory remoteStoreStatsTrackerFactory ,
402
389
RecoverySettings recoverySettings ,
403
- CacheService cacheService
390
+ CacheService cacheService ,
391
+ RemoteStoreSettings remoteStoreSettings
404
392
) {
405
393
this .settings = settings ;
406
394
this .threadPool = threadPool ;
@@ -504,10 +492,8 @@ protected void closeInternal() {
504
492
this .clusterDefaultRefreshInterval = CLUSTER_DEFAULT_INDEX_REFRESH_INTERVAL_SETTING .get (clusterService .getSettings ());
505
493
clusterService .getClusterSettings ()
506
494
.addSettingsUpdateConsumer (CLUSTER_DEFAULT_INDEX_REFRESH_INTERVAL_SETTING , this ::onRefreshIntervalUpdate );
507
- this .clusterRemoteTranslogBufferInterval = CLUSTER_REMOTE_TRANSLOG_BUFFER_INTERVAL_SETTING .get (clusterService .getSettings ());
508
- clusterService .getClusterSettings ()
509
- .addSettingsUpdateConsumer (CLUSTER_REMOTE_TRANSLOG_BUFFER_INTERVAL_SETTING , this ::setClusterRemoteTranslogBufferInterval );
510
495
this .recoverySettings = recoverySettings ;
496
+ this .remoteStoreSettings = remoteStoreSettings ;
511
497
}
512
498
513
499
/**
@@ -913,8 +899,8 @@ private synchronized IndexService createIndexService(
913
899
remoteDirectoryFactory ,
914
900
translogFactorySupplier ,
915
901
this ::getClusterDefaultRefreshInterval ,
916
- this :: getClusterRemoteTranslogBufferInterval ,
917
- this .recoverySettings
902
+ this . recoverySettings ,
903
+ this .remoteStoreSettings
918
904
);
919
905
}
920
906
@@ -2034,12 +2020,7 @@ private TimeValue getClusterDefaultRefreshInterval() {
2034
2020
return this .clusterDefaultRefreshInterval ;
2035
2021
}
2036
2022
2037
- // Exclusively for testing, please do not use it elsewhere.
2038
- public TimeValue getClusterRemoteTranslogBufferInterval () {
2039
- return clusterRemoteTranslogBufferInterval ;
2040
- }
2041
-
2042
- private void setClusterRemoteTranslogBufferInterval (TimeValue clusterRemoteTranslogBufferInterval ) {
2043
- this .clusterRemoteTranslogBufferInterval = clusterRemoteTranslogBufferInterval ;
2023
+ public RemoteStoreSettings getRemoteStoreSettings () {
2024
+ return this .remoteStoreSettings ;
2044
2025
}
2045
2026
}
0 commit comments