@@ -249,17 +249,6 @@ public class IndicesService extends AbstractLifecycleComponent
249
249
Property .Final
250
250
);
251
251
252
- /**
253
- * Used to specify the default translog buffer interval for remote store backed indexes.
254
- */
255
- public static final Setting <TimeValue > CLUSTER_REMOTE_TRANSLOG_BUFFER_INTERVAL_SETTING = Setting .timeSetting (
256
- "cluster.remote_store.translog.buffer_interval" ,
257
- IndexSettings .DEFAULT_REMOTE_TRANSLOG_BUFFER_INTERVAL ,
258
- IndexSettings .MINIMUM_REMOTE_TRANSLOG_BUFFER_INTERVAL ,
259
- Property .NodeScope ,
260
- Property .Dynamic
261
- );
262
-
263
252
/**
264
253
* This setting is used to set the refresh interval when the {@code index.refresh_interval} index setting is not
265
254
* provided during index creation or when the existing {@code index.refresh_interval} index setting is set as null.
@@ -366,7 +355,7 @@ public class IndicesService extends AbstractLifecycleComponent
366
355
private volatile boolean idFieldDataEnabled ;
367
356
private volatile boolean allowExpensiveQueries ;
368
357
private final RecoverySettings recoverySettings ;
369
-
358
+ private final RemoteStoreSettings remoteStoreSettings ;
370
359
@ Nullable
371
360
private final OpenSearchThreadPoolExecutor danglingIndicesThreadPoolExecutor ;
372
361
private final Set <Index > danglingIndicesToWrite = Sets .newConcurrentHashSet ();
@@ -375,8 +364,6 @@ public class IndicesService extends AbstractLifecycleComponent
375
364
private final IndexStorePlugin .DirectoryFactory remoteDirectoryFactory ;
376
365
private final BiFunction <IndexSettings , ShardRouting , TranslogFactory > translogFactorySupplier ;
377
366
private volatile TimeValue clusterDefaultRefreshInterval ;
378
- private volatile TimeValue clusterRemoteTranslogBufferInterval ;
379
-
380
367
private final SearchRequestStats searchRequestStats ;
381
368
382
369
@ Override
@@ -411,7 +398,8 @@ public IndicesService(
411
398
SearchRequestStats searchRequestStats ,
412
399
@ Nullable RemoteStoreStatsTrackerFactory remoteStoreStatsTrackerFactory ,
413
400
RecoverySettings recoverySettings ,
414
- CacheService cacheService
401
+ CacheService cacheService ,
402
+ RemoteStoreSettings remoteStoreSettings
415
403
) {
416
404
this .settings = settings ;
417
405
this .threadPool = threadPool ;
@@ -515,10 +503,8 @@ protected void closeInternal() {
515
503
this .clusterDefaultRefreshInterval = CLUSTER_DEFAULT_INDEX_REFRESH_INTERVAL_SETTING .get (clusterService .getSettings ());
516
504
clusterService .getClusterSettings ()
517
505
.addSettingsUpdateConsumer (CLUSTER_DEFAULT_INDEX_REFRESH_INTERVAL_SETTING , this ::onRefreshIntervalUpdate );
518
- this .clusterRemoteTranslogBufferInterval = CLUSTER_REMOTE_TRANSLOG_BUFFER_INTERVAL_SETTING .get (clusterService .getSettings ());
519
- clusterService .getClusterSettings ()
520
- .addSettingsUpdateConsumer (CLUSTER_REMOTE_TRANSLOG_BUFFER_INTERVAL_SETTING , this ::setClusterRemoteTranslogBufferInterval );
521
506
this .recoverySettings = recoverySettings ;
507
+ this .remoteStoreSettings = remoteStoreSettings ;
522
508
}
523
509
524
510
/**
@@ -923,8 +909,8 @@ private synchronized IndexService createIndexService(
923
909
remoteDirectoryFactory ,
924
910
translogFactorySupplier ,
925
911
this ::getClusterDefaultRefreshInterval ,
926
- this :: getClusterRemoteTranslogBufferInterval ,
927
- this .recoverySettings
912
+ this . recoverySettings ,
913
+ this .remoteStoreSettings
928
914
);
929
915
}
930
916
@@ -2044,12 +2030,7 @@ private TimeValue getClusterDefaultRefreshInterval() {
2044
2030
return this .clusterDefaultRefreshInterval ;
2045
2031
}
2046
2032
2047
- // Exclusively for testing, please do not use it elsewhere.
2048
- public TimeValue getClusterRemoteTranslogBufferInterval () {
2049
- return clusterRemoteTranslogBufferInterval ;
2050
- }
2051
-
2052
- private void setClusterRemoteTranslogBufferInterval (TimeValue clusterRemoteTranslogBufferInterval ) {
2053
- this .clusterRemoteTranslogBufferInterval = clusterRemoteTranslogBufferInterval ;
2033
+ public RemoteStoreSettings getRemoteStoreSettings () {
2034
+ return this .remoteStoreSettings ;
2054
2035
}
2055
2036
}
0 commit comments