Skip to content

Use 'FIXED' path type in DedicatedClusterSnapshotRestoreIT #17996

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

Merged
merged 1 commit into from
Apr 18, 2025
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 @@ -69,6 +69,7 @@
import org.opensearch.core.xcontent.NamedXContentRegistry;
import org.opensearch.core.xcontent.XContentParser;
import org.opensearch.env.Environment;
import org.opensearch.index.remote.RemoteStoreEnums;
import org.opensearch.index.seqno.RetentionLeaseActions;
import org.opensearch.index.seqno.RetentionLeases;
import org.opensearch.indices.recovery.PeerRecoveryTargetService;
Expand Down Expand Up @@ -450,7 +451,12 @@ public void testSnapshotWithStuckNode() throws Exception {
createRepository(
"test-repo",
"mock",
Settings.builder().put("location", repo).put("random", randomAlphaOfLength(10)).put("wait_after_unblock", 200)
Settings.builder()
.put("location", repo)
.put("random", randomAlphaOfLength(10))
.put("wait_after_unblock", 200)
// TODO: There's likely a bug with other path types where cleanup seems to leave unexpected files
.put(BlobStoreRepository.SHARD_PATH_TYPE.getKey(), RemoteStoreEnums.PathType.FIXED)
);

// Pick one node and block it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2674,7 +2674,7 @@ public static PutRepositoryRequestBuilder putRepositoryRequestBuilder(
if (timeout != null) {
builder.setTimeout(timeout);
}
if (finalSettings == false) {
if (finalSettings == false && settings.keys().contains(BlobStoreRepository.SHARD_PATH_TYPE.getKey()) == false) {
settings.put(BlobStoreRepository.SHARD_PATH_TYPE.getKey(), randomFrom(PathType.values()));
}
builder.setSettings(settings);
Expand Down
Loading