Provide frozen snapshot of features context when requested#1213
Merged
0xnm merged 1 commit intoJan 4, 2023
Conversation
Codecov Report
@@ Coverage Diff @@
## feature/sdkv2 #1213 +/- ##
=================================================
+ Coverage 82.65% 82.72% +0.07%
=================================================
Files 353 353
Lines 12568 12571 +3
Branches 2084 2084
=================================================
+ Hits 10388 10399 +11
Misses 1536 1536
+ Partials 644 636 -8
|
Base automatically changed from
nogorodnikov/rumm-2828/send-logs-for-span-using-message-bus
to
feature/sdkv2
January 4, 2023 10:47
mariusc83
approved these changes
Jan 4, 2023
0xnm
deleted the
nogorodnikov/make-features-context-snapshot-at-the-datadog-context-creation-time
branch
January 4, 2023 12:21
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
This change fixes a possible concurrency issue, when feature context can be modified by another thread while it is read by the caller. To solve this we are going to make a snapshot for the top 2 levels (features and feature-specific keys), this should be enough to get completely immutable map for cases of storage for our features (they are storing only strings, which are immutable, and no deeper than 2 levels).
Review checklist (to be filled by reviewers)