File tree 3 files changed +19
-1
lines changed
server/src/main/java/org/opensearch
3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,13 @@ public ClusterState state() {
233
233
return clusterState ;
234
234
}
235
235
236
+ /**
237
+ * Returns true if the appliedClusterState is not null
238
+ */
239
+ public boolean isStateInitialised () {
240
+ return this .state .get () != null ;
241
+ }
242
+
236
243
/**
237
244
* Returns true if the appliedClusterState is not null
238
245
*/
Original file line number Diff line number Diff line change @@ -183,6 +183,13 @@ public ClusterState state() {
183
183
return clusterApplierService .state ();
184
184
}
185
185
186
+ /**
187
+ * Returns true if the state in appliedClusterState is not null
188
+ */
189
+ public boolean isStateInitialised () {
190
+ return clusterApplierService .isStateInitialised ();
191
+ }
192
+
186
193
/**
187
194
* The state that is persisted to store but may not be applied to cluster.
188
195
* @return ClusterState
Original file line number Diff line number Diff line change @@ -3093,7 +3093,11 @@ public String startVerification() {
3093
3093
*/
3094
3094
private BlobContainer testContainer (String seed ) {
3095
3095
BlobPath testBlobPath ;
3096
- if (prefixModeVerification == true ) {
3096
+ if (prefixModeVerification == true
3097
+ && (clusterService .isStateInitialised () == false
3098
+ || clusterService .state ().nodes ().getMinNodeVersion ().onOrAfter (Version .V_2_17_0 ))) {
3099
+ // During the remote store node bootstrap, the cluster state is not initialised
3100
+ // Otherwise, the cluster state is initialised and available with the min node version information
3097
3101
BasePathInput pathInput = BasePathInput .builder ().basePath (basePath ()).indexUUID (seed ).build ();
3098
3102
testBlobPath = PathType .HASHED_PREFIX .path (pathInput , FNV_1A_COMPOSITE_1 );
3099
3103
} else {
You can’t perform that action at this time.
0 commit comments