Skip to content

Commit

Permalink
Flag moved by PR elastic#90020.
Browse files Browse the repository at this point in the history
  • Loading branch information
justincr-elastic committed Sep 23, 2022
1 parent 98325f3 commit dc520f1
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
package org.elasticsearch.common.settings;

import org.apache.logging.log4j.LogManager;
import org.elasticsearch.Build;
import org.elasticsearch.action.admin.cluster.configuration.TransportAddVotingConfigExclusionsAction;
import org.elasticsearch.action.admin.indices.close.TransportCloseIndexAction;
import org.elasticsearch.action.search.TransportSearchAction;
Expand Down Expand Up @@ -113,23 +112,23 @@
import org.elasticsearch.transport.RemoteClusterService;
import org.elasticsearch.transport.RemoteConnectionStrategy;
import org.elasticsearch.transport.SniffConnectionStrategy;
import org.elasticsearch.transport.TcpTransport;
import org.elasticsearch.transport.TransportSettings;
import org.elasticsearch.watcher.ResourceWatcherService;

import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
* Encapsulates all valid cluster level settings.
*/
public final class ClusterSettings extends AbstractScopedSettings {

// CCX 2.0 = Cross Cluster Search (CCS) 2.0 || Cross Cluster Replication (CCR) 2.0
public static final boolean CCX2_FEATURE_FLAG_ENABLED = Build.CURRENT.isSnapshot()
|| "true".equals(System.getProperty("es.ccx2_feature_flag_enabled"));

public ClusterSettings(final Settings nodeSettings, final Set<Setting<?>> settingsSet) {
this(nodeSettings, settingsSet, Collections.emptySet());
}
Expand Down Expand Up @@ -190,7 +189,7 @@ public void apply(Settings value, Settings current, Settings previous) {
}
}

public static Set<Setting<?>> BUILT_IN_CLUSTER_SETTINGS = Set.of(
public static Set<Setting<?>> BUILT_IN_CLUSTER_SETTINGS = Stream.of(
AwarenessAllocationDecider.CLUSTER_ROUTING_ALLOCATION_AWARENESS_ATTRIBUTE_SETTING,
AwarenessAllocationDecider.CLUSTER_ROUTING_ALLOCATION_AWARENESS_FORCE_GROUP_SETTING,
BalancedShardsAllocator.INDEX_BALANCE_FACTOR_SETTING,
Expand Down Expand Up @@ -335,7 +334,6 @@ public void apply(Settings value, Settings current, Settings previous) {
ProxyConnectionStrategy.SERVER_NAME,
SniffConnectionStrategy.REMOTE_CLUSTERS_PROXY,
SniffConnectionStrategy.REMOTE_CLUSTER_SEEDS,
SniffConnectionStrategy.REMOTE_CLUSTER_AUTHORIZATION,
SniffConnectionStrategy.REMOTE_NODE_CONNECTIONS,
TransportCloseIndexAction.CLUSTER_INDICES_CLOSE_ENABLE_SETTING,
ShardsLimitAllocationDecider.CLUSTER_TOTAL_SHARDS_PER_NODE_SETTING,
Expand Down Expand Up @@ -533,8 +531,9 @@ public void apply(Settings value, Settings current, Settings previous) {
ReadinessService.PORT,
HealthNodeTaskExecutor.ENABLED_SETTING,
LocalHealthMonitor.POLL_INTERVAL_SETTING,
TransportHealthNodeAction.HEALTH_NODE_TRANSPORT_ACTION_TIMEOUT
);
TransportHealthNodeAction.HEALTH_NODE_TRANSPORT_ACTION_TIMEOUT,
TcpTransport.isUntrustedRemoteClusterEnabled() ? SniffConnectionStrategy.REMOTE_CLUSTER_AUTHORIZATION : null
).filter(Objects::nonNull).collect(Collectors.toSet());

static List<SettingUpgrader<?>> BUILT_IN_SETTING_UPGRADERS = Collections.emptyList();

Expand Down

0 comments on commit dc520f1

Please sign in to comment.