-
Notifications
You must be signed in to change notification settings - Fork 119
Support Microsoft Feature Flag schema feature flag schema v1.1.0 by default #319
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
zhiyuanliang-ms
merged 34 commits into
main
from
zhiyuanliang/support-server-side-schema
Jan 24, 2024
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
9069aad
support app config server side schema
zhiyuanliang-ms 1547ee5
avoid naming with server-side
zhiyuanliang-ms 8a8ca97
fix bug
zhiyuanliang-ms e4f89f7
testcase added
zhiyuanliang-ms b5b859d
reorg the code
zhiyuanliang-ms 7933989
update the naming
zhiyuanliang-ms cd3b3f5
fix typo
zhiyuanliang-ms 1270e37
adjust indentation
zhiyuanliang-ms da89f81
resolve comments
zhiyuanliang-ms bae3270
revert unexpected change
zhiyuanliang-ms 8c13231
adjust the logic of get feature flag definition section
zhiyuanliang-ms f54b66a
revert changes
zhiyuanliang-ms c4cfcf3
fix bug
zhiyuanliang-ms 8baa4c7
resolve comments
zhiyuanliang-ms 7d73b06
resolved comments
zhiyuanliang-ms dca69d3
update
zhiyuanliang-ms 9d21987
update
zhiyuanliang-ms 729af66
make schema selection thread-safe
zhiyuanliang-ms 1e41ac1
update testcases
zhiyuanliang-ms 66e3841
update naming
zhiyuanliang-ms 646be65
update
zhiyuanliang-ms ed5ba39
resolve comments
zhiyuanliang-ms fb75dfa
thread-safe
zhiyuanliang-ms 5048f80
Merge branch 'main' into zhiyuanliang/support-server-side-schema
zhiyuanliang-ms a4805a3
improvement
zhiyuanliang-ms 421eb69
resolve comments
zhiyuanliang-ms 0f4a889
use lock
zhiyuanliang-ms 1a565a1
resolve comments
zhiyuanliang-ms 29a6aed
Merge branch 'main' into zhiyuanliang/support-server-side-schema
zhiyuanliang-ms c0e9db6
Merge branch 'main' into zhiyuanliang/support-server-side-schema
zhiyuanliang-ms b54142c
Merge branch 'main' into zhiyuanliang/support-server-side-schema
zhiyuanliang-ms c12feef
rename to Microsoft Feature Flag schema
zhiyuanliang-ms ebf9bd2
Merge branch 'zhiyuanliang/support-server-side-schema' of https://git…
zhiyuanliang-ms 05dd60a
Merge branch 'main' into zhiyuanliang/support-server-side-schema
zhiyuanliang-ms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
| // | ||
|
|
||
| namespace Microsoft.FeatureManagement | ||
| { | ||
| internal static class ConfigurationFields | ||
| { | ||
| // Enum keywords | ||
| public const string RequirementType = "RequirementType"; | ||
|
|
||
| // Feature filters keywords | ||
| public const string FeatureFiltersSectionName = "EnabledFor"; | ||
| public const string FeatureFilterConfigurationParameters = "Parameters"; | ||
|
|
||
| // Other keywords | ||
| public const string NameKeyword = "Name"; | ||
| public const string FeatureManagementSectionName = "FeatureManagement"; | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
lock can sure only one thread can enter this block, what is the reason for using
Interlocked.Read(ref _initialized)to atomically get the value?Mark int32 type
_initializedasvolatilethen judge_initialized == 0is fine. Am I missing anything?Uh oh!
There was an error while loading. Please reload this page.
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.
Or use
is also fine.
Uh oh!
There was an error while loading. Please reload this page.
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.
Interlocked exchange does perform an atomic swap, but it also has the added benefit of forcing a read from memory. Here, interlocked avoids cached read from CPU. Marking the variable as volatile will have lasting effect throughout the lifetime of the application whereas interlocked usage in the init check only happens during initialization.