|
@@ -622,6 +622,7 @@ public class Node implements Closeable {
|
|
|
resourcesToClose.add(circuitBreakerService);
|
|
|
modules.add(new GatewayModule());
|
|
|
|
|
|
+ CompatibilityVersions compatibilityVersions = new CompatibilityVersions(TransportVersion.current());
|
|
|
PageCacheRecycler pageCacheRecycler = createPageCacheRecycler(settings);
|
|
|
BigArrays bigArrays = createBigArrays(pageCacheRecycler, circuitBreakerService);
|
|
|
modules.add(settingsModule);
|
|
@@ -629,7 +630,8 @@ public class Node implements Closeable {
|
|
|
final PersistedClusterStateService persistedClusterStateService = newPersistedClusterStateService(
|
|
|
xContentRegistry,
|
|
|
clusterService.getClusterSettings(),
|
|
|
- threadPool
|
|
|
+ threadPool,
|
|
|
+ compatibilityVersions
|
|
|
);
|
|
|
|
|
|
// collect engine factory providers from plugins
|
|
@@ -927,7 +929,6 @@ public class Node implements Closeable {
|
|
|
);
|
|
|
clusterInfoService.addListener(diskThresholdMonitor::onNewInfo);
|
|
|
|
|
|
- CompatibilityVersions compatibilityVersions = new CompatibilityVersions(TransportVersion.current());
|
|
|
final DiscoveryModule discoveryModule = new DiscoveryModule(
|
|
|
settings,
|
|
|
transportService,
|
|
@@ -1359,7 +1360,8 @@ public class Node implements Closeable {
|
|
|
private PersistedClusterStateService newPersistedClusterStateService(
|
|
|
NamedXContentRegistry xContentRegistry,
|
|
|
ClusterSettings clusterSettings,
|
|
|
- ThreadPool threadPool
|
|
|
+ ThreadPool threadPool,
|
|
|
+ CompatibilityVersions compatibilityVersions
|
|
|
) {
|
|
|
final List<ClusterCoordinationPlugin.PersistedClusterStateServiceFactory> persistedClusterStateServiceFactories = pluginsService
|
|
|
.filterPlugins(ClusterCoordinationPlugin.class)
|
|
@@ -1374,7 +1376,7 @@ public class Node implements Closeable {
|
|
|
|
|
|
if (persistedClusterStateServiceFactories.size() == 1) {
|
|
|
return persistedClusterStateServiceFactories.get(0)
|
|
|
- .newPersistedClusterStateService(nodeEnvironment, xContentRegistry, clusterSettings, threadPool);
|
|
|
+ .newPersistedClusterStateService(nodeEnvironment, xContentRegistry, clusterSettings, threadPool, compatibilityVersions);
|
|
|
}
|
|
|
|
|
|
return new PersistedClusterStateService(nodeEnvironment, xContentRegistry, clusterSettings, threadPool::relativeTimeInMillis);
|