You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (clusterService.state().getMetadata().hasIndex(TASK_POLLING_JOB_INDEX)) {
88
-
mlTaskManager.startTaskPollingJob();
89
-
}
82
+
/*
83
+
* In version 3.1, a new index `.plugins-ml-jobs` replaces the old `.ml_commons_task_polling_job` index for the job scheduler.
84
+
* Version 3.1 also introduces a stats collector job that should run at startup if the relevant settings are enabled.
85
+
* When upgrading from 3.0 to 3.1, we need to ensure the new `.plugins-ml-jobs` index is created if either:
86
+
* - The stats collector job is enabled, or
87
+
* - The batch polling task job was already running.
88
+
* To avoid issues during blue/green or rolling upgrades, we wait for a data node running 3.1 or later before creating the new jobs index and starting the jobs.
89
+
* The following logic implements this behavior.
90
+
*/
91
+
for (DiscoveryNodenode : state.nodes()) {
92
+
if (node.isDataNode() && Version.V_3_1_0.onOrAfter(node.getVersion())) {
93
+
if (mlFeatureEnabledSetting.isMetricCollectionEnabled() && mlFeatureEnabledSetting.isStaticMetricCollectionEnabled()) {
0 commit comments