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

[Remote Store] Introducing mixed mode support for remote store migration #11986

Merged
merged 4 commits into from
Feb 16, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Missing java doc
Signed-off-by: Gaurav Bafna <[email protected]>
gbbafna committed Feb 15, 2024
commit 08afbf47957b60a583a6b756a4879642b247fab6
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@
value -> {
if (value == CompatibilityMode.MIXED
&& FeatureFlags.isEnabled(FeatureFlags.REMOTE_STORE_MIGRATION_EXPERIMENTAL_SETTING) == false) {
throw new IllegalArgumentException(

Check warning on line 49 in server/src/main/java/org/opensearch/node/remotestore/RemoteStoreNodeService.java

Codecov / codecov/patch

server/src/main/java/org/opensearch/node/remotestore/RemoteStoreNodeService.java#L49

Added line #L49 was not covered by tests
" mixed mode is under an experimental feature and can be activated only by enabling "
+ REMOTE_STORE_MIGRATION_EXPERIMENTAL
+ " feature flag in the JVM options "
@@ -63,13 +63,13 @@
Direction::parseString,
value -> {
if (value != Direction.NONE && FeatureFlags.isEnabled(FeatureFlags.REMOTE_STORE_MIGRATION_EXPERIMENTAL_SETTING) == false) {
throw new IllegalArgumentException(

Check warning on line 66 in server/src/main/java/org/opensearch/node/remotestore/RemoteStoreNodeService.java

Codecov / codecov/patch

server/src/main/java/org/opensearch/node/remotestore/RemoteStoreNodeService.java#L66

Added line #L66 was not covered by tests
" migration.direction is under an experimental feature and can be activated only by enabling "
+ REMOTE_STORE_MIGRATION_EXPERIMENTAL
+ " feature flag in the JVM options "
);
}
},

Check warning on line 72 in server/src/main/java/org/opensearch/node/remotestore/RemoteStoreNodeService.java

Codecov / codecov/patch

server/src/main/java/org/opensearch/node/remotestore/RemoteStoreNodeService.java#L72

Added line #L72 was not covered by tests
Setting.Property.Dynamic,
Setting.Property.NodeScope
);
@@ -98,13 +98,18 @@
+ compatibilityMode
+ "] compatibility mode is not supported. "
+ "supported modes are ["
+ Arrays.toString(CompatibilityMode.values())

Check warning on line 101 in server/src/main/java/org/opensearch/node/remotestore/RemoteStoreNodeService.java

Codecov / codecov/patch

server/src/main/java/org/opensearch/node/remotestore/RemoteStoreNodeService.java#L101

Added line #L101 was not covered by tests
+ "]"
);
}
}
}

/**
* Migration Direction intended for docrep to remote store migration and vice versa
*
* @opensearch.internal
*/
public enum Direction {
REMOTE_STORE("remote_store"),
NONE("none"),
@@ -119,8 +124,8 @@
public static Direction parseString(String direction) {
try {
return Direction.valueOf(direction.toUpperCase(Locale.ROOT));
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("[" + direction + "] migration.direction is not supported.");

Check warning on line 128 in server/src/main/java/org/opensearch/node/remotestore/RemoteStoreNodeService.java

Codecov / codecov/patch

server/src/main/java/org/opensearch/node/remotestore/RemoteStoreNodeService.java#L127-L128

Added lines #L127 - L128 were not covered by tests
}
}
}