Skip to content

Commit

Permalink
Fix minor issues
Browse files Browse the repository at this point in the history
Signed-off-by: Rahul Karajgikar <karajgik@amazon.com>
  • Loading branch information
Rahul Karajgikar committed Oct 21, 2023
1 parent 1891d81 commit 8fd9acb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,8 @@ public void apply(Settings value, Settings current, Settings previous) {

// Remote cluster state settings
RemoteClusterStateService.REMOTE_CLUSTER_STATE_ENABLED_SETTING,
RemoteClusterStateService.INDEX_METADATA_UPLOAD_WAIT_TIME_SETTINGS,
RemoteClusterStateService.GLOBAL_METADATA_UPLOAD_WAIT_TIME_SETTINGS,
RemoteClusterStateService.INDEX_METADATA_UPLOAD_WAIT_TIME_SETTING,
RemoteClusterStateService.GLOBAL_METADATA_UPLOAD_WAIT_TIME_SETTING,
RemoteStoreNodeService.REMOTE_STORE_COMPATIBILITY_MODE_SETTING,
IndicesService.CLUSTER_REMOTE_TRANSLOG_BUFFER_INTERVAL_SETTING,
IndicesService.CLUSTER_REMOTE_INDEX_RESTRICT_ASYNC_DURABILITY_SETTING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,23 +83,19 @@ public class RemoteClusterStateService implements Closeable {

private static final Logger logger = LogManager.getLogger(RemoteClusterStateService.class);

// TODO make this two variable as dynamic setting [issue: #10688]
// public static final int INDEX_METADATA_UPLOAD_WAIT_MILLIS = 20000;
// public static final int GLOBAL_METADATA_UPLOAD_WAIT_MILLIS = 20000;

// default value for index metadata upload wait is 20s
static volatile TimeValue indexMetadataUploadWaitTime = TimeValue.timeValueMillis(20000);
// default value for index metadata upload wait is 20s
static volatile TimeValue globalMetadataUploadWaitTime = TimeValue.timeValueMillis(20000);

public static final Setting<TimeValue> INDEX_METADATA_UPLOAD_WAIT_TIME_SETTINGS = Setting.timeSetting(
public static final Setting<TimeValue> INDEX_METADATA_UPLOAD_WAIT_TIME_SETTING = Setting.timeSetting(
"cluster.remote_store.index_metadata.upload_wait_time",
indexMetadataUploadWaitTime,
Setting.Property.Dynamic,
Setting.Property.NodeScope
);

public static final Setting<TimeValue> GLOBAL_METADATA_UPLOAD_WAIT_TIME_SETTINGS = Setting.timeSetting(
public static final Setting<TimeValue> GLOBAL_METADATA_UPLOAD_WAIT_TIME_SETTING = Setting.timeSetting(
"cluster.remote_store.global_metadata.upload_wait_time",
globalMetadataUploadWaitTime,
Setting.Property.Dynamic,
Expand Down Expand Up @@ -191,10 +187,10 @@ public RemoteClusterStateService(
this.threadpool = threadPool;
this.slowWriteLoggingThreshold = clusterSettings.get(SLOW_WRITE_LOGGING_THRESHOLD);
clusterSettings.addSettingsUpdateConsumer(SLOW_WRITE_LOGGING_THRESHOLD, this::setSlowWriteLoggingThreshold);
clusterSettings.addSettingsUpdateConsumer(INDEX_METADATA_UPLOAD_WAIT_TIME_SETTINGS, this::setIndexMetadataUploadWaitTime);
clusterSettings.addSettingsUpdateConsumer(GLOBAL_METADATA_UPLOAD_WAIT_TIME_SETTINGS, this::setGlobalMetadataUploadWaitTime);
setIndexMetadataUploadWaitTime(INDEX_METADATA_UPLOAD_WAIT_TIME_SETTINGS.get(settings));
setGlobalMetadataUploadWaitTime(GLOBAL_METADATA_UPLOAD_WAIT_TIME_SETTINGS.get(settings));
clusterSettings.addSettingsUpdateConsumer(INDEX_METADATA_UPLOAD_WAIT_TIME_SETTING, this::setIndexMetadataUploadWaitTime);
clusterSettings.addSettingsUpdateConsumer(GLOBAL_METADATA_UPLOAD_WAIT_TIME_SETTING, this::setGlobalMetadataUploadWaitTime);
setIndexMetadataUploadWaitTime(INDEX_METADATA_UPLOAD_WAIT_TIME_SETTING.get(settings));
setGlobalMetadataUploadWaitTime(GLOBAL_METADATA_UPLOAD_WAIT_TIME_SETTING.get(settings));
}

private BlobStoreTransferService getBlobStoreTransferService() {
Expand Down

0 comments on commit 8fd9acb

Please sign in to comment.