-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Segment Replication] Introduce new SEGMENT_REPLICATION_EXPERIMENTAL feature flag. #7006
[Segment Replication] Introduce new SEGMENT_REPLICATION_EXPERIMENTAL feature flag. #7006
Conversation
…ready for users to use. Signed-off-by: Rishikesh1159 <[email protected]>
…h1159/OpenSearch into new-segrep-feature-flag
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Rishikesh1159 <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
@@ -35,6 +35,7 @@ protected FeatureFlagSettings( | |||
new HashSet<>( | |||
Arrays.asList( | |||
FeatureFlags.REPLICATION_TYPE_SETTING, | |||
FeatureFlags.SEGMENT_REPLICATION_CLUSTER_REPLICATION_TYPE_SETTING, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be renamed REPLICATION_TYPE_SEGMENT_REPLICATION_CLUSTER_SETTING for readability. That way we preserve the SEGMENT_REPLICATION_CLUSTER_SETTING in the name to show users it's related.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure will update this in next commit.
@@ -27,6 +27,13 @@ public class FeatureFlags { | |||
*/ | |||
public static final String REPLICATION_TYPE = "opensearch.experimental.feature.replication_type.enabled"; | |||
|
|||
/** | |||
* Gates the visibility of the segment replication cluster setting that allows changing of replication type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Gates the visibility of the segment replication cluster setting that allows changing of replication type. | |
* Gates the visibility of the segment replication cluster setting that allows changing of default replication type in a cluster. |
Signed-off-by: Rishikesh1159 <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #7006 +/- ##
============================================
+ Coverage 70.77% 70.82% +0.04%
- Complexity 59270 59299 +29
============================================
Files 4822 4822
Lines 283940 283940
Branches 40947 40947
============================================
+ Hits 200963 201090 +127
+ Misses 66454 66370 -84
+ Partials 16523 16480 -43
... and 472 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -646,7 +646,7 @@ public void apply(Settings value, Settings current, Settings previous) { | |||
public static final Map<String, List<Setting>> FEATURE_FLAGGED_CLUSTER_SETTINGS = Map.of( | |||
FeatureFlags.SEARCHABLE_SNAPSHOT, | |||
List.of(Node.NODE_SEARCH_CACHE_SIZE_SETTING), | |||
FeatureFlags.REPLICATION_TYPE, | |||
FeatureFlags.SEGMENT_REPLICATION_CLUSTER_SETTING, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the goal was to reuse the FeatureFlags.REPLICATION_TYPE_SETTING
since we were going to get rid of the gating mechanism in other places, and keep this one behind the existing flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes initially even I was thinking on same line, but the reason I added new feature flag is because FeatureFlags.REPLICATION_TYPE_SETTING
feature flag is old, I mean many users are already aware of this feature flag, they can mistakenly enable this expecting some other behaviour and some users might get confused on why after segrep GA release they have a feature flag. In order to avoid this confusion I thought creating a new feature flag which is not popular among users and only known to few for testing purposes.
Other than avoiding confusion I don't have any strong opinion on adding new feature flag. @kotwanikunal what are your thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a good plan! Let's go ahead with the new flag to avoid any confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering new features and enhancements that we are going to introduce in the future, I think it better to use the same feature flag, So, they are flagged as beta features and users can use same flag to test them, instead of having different flags for each enhancement. @Rishikesh1159 @kotwanikunal what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my original intent. An alternative solution that might work going forward is introducing a new feature flag which gates experimental features only - FeatureFlags.SEGMENT_REPLICATION_EXPERIMENTAL
. This will avoid the confusion that @Rishikesh1159 was talking about as well as serves our purpose going forward with new/experimental features until we release them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thanks @kotwanikunal and @anasalkouz for your thoughts. I think kunal's alternative solution here makes sense. It will make things cleaner. I will go ahead and create new FeatureFlags.SEGMENT_REPLICATION_EXPERIMENTAL and we can use this for future segrep experimental features.
…_EXPERIMENTAL. Signed-off-by: Rishikesh1159 <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
…feature flag. (#7006) * Add new SEGMENT_REPLICATION_CLUSTER_SETTING feature flag. Signed-off-by: Rishikesh1159 <[email protected]> * Remove entry from changelog as the cluster setting introduced is noy ready for users to use. Signed-off-by: Rishikesh1159 <[email protected]> * Fix failing unit tests. Signed-off-by: Rishikesh1159 <[email protected]> * Address comments on PR. Signed-off-by: Rishikesh1159 <[email protected]> * Address comments on PR and chnage feature flag to SEGMENT_REPLICATION_EXPERIMENTAL. Signed-off-by: Rishikesh1159 <[email protected]> --------- Signed-off-by: Rishikesh1159 <[email protected]> (cherry picked from commit fe8b4d4) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…feature flag. (#7006) (#7042) * Add new SEGMENT_REPLICATION_CLUSTER_SETTING feature flag. * Remove entry from changelog as the cluster setting introduced is noy ready for users to use. * Fix failing unit tests. * Address comments on PR. * Address comments on PR and chnage feature flag to SEGMENT_REPLICATION_EXPERIMENTAL. --------- (cherry picked from commit fe8b4d4) Signed-off-by: Rishikesh1159 <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
This PR adds new SEGMENT_REPLICATION_EXPERIMENTAL feature flag. This Feature Flag should strictly be used only for testing purposes.
This PR puts cluster setting introduced behind this new SEGMENT_REPLICATION_EXPERIMENTAL feature flag.
Issues Resolved
Resolves #6952
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.