Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle version during repository registration for prefix mode verification #16849

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,13 @@ public ClusterState state() {
return clusterState;
}

/**
* Returns true if the appliedClusterState is not null
*/
public boolean isStateInitialised() {
return this.state.get() != null;
}

/**
* Returns true if the appliedClusterState is not null
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ public ClusterState state() {
return clusterApplierService.state();
}

/**
* Returns true if the state in appliedClusterState is not null
*/
public boolean isStateInitialised() {
return clusterApplierService.isStateInitialised();
}

/**
* The state that is persisted to store but may not be applied to cluster.
* @return ClusterState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3093,7 +3093,11 @@ public String startVerification() {
*/
private BlobContainer testContainer(String seed) {
BlobPath testBlobPath;
if (prefixModeVerification == true) {
if (prefixModeVerification == true
&& (clusterService.isStateInitialised() == false
|| clusterService.state().nodes().getMinNodeVersion().onOrAfter(Version.V_2_17_0))) {
// During the remote store node bootstrap, the cluster state is not initialised
// Otherwise, the cluster state is initialised and available with the min node version information
BasePathInput pathInput = BasePathInput.builder().basePath(basePath()).indexUUID(seed).build();
testBlobPath = PathType.HASHED_PREFIX.path(pathInput, FNV_1A_COMPOSITE_1);
} else {
Expand Down
Loading