-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[pdata] Enable the pdata mutation safeguards in the fanout consumers #8634
Merged
dmitryax
merged 3 commits into
open-telemetry:main
from
dmitryax:enable-pdata-mutation-safeguard
Oct 16, 2023
Merged
[pdata] Enable the pdata mutation safeguards in the fanout consumers #8634
dmitryax
merged 3 commits into
open-telemetry:main
from
dmitryax:enable-pdata-mutation-safeguard
Oct 16, 2023
Conversation
This file contains 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
dmitryax
force-pushed
the
enable-pdata-mutation-safeguard
branch
2 times, most recently
from
October 7, 2023 00:27
d6855ae
to
af945d7
Compare
Codecov ReportAll modified lines are covered by tests ✅
... and 1 file with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
dmitryax
force-pushed
the
enable-pdata-mutation-safeguard
branch
3 times, most recently
from
October 7, 2023 04:38
e9607bb
to
6aa4367
Compare
bogdandrutu
reviewed
Oct 9, 2023
dmitryax
force-pushed
the
enable-pdata-mutation-safeguard
branch
3 times, most recently
from
October 10, 2023 23:54
7fb8350
to
7cbd3e2
Compare
bogdandrutu
approved these changes
Oct 11, 2023
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 like more the logs code.
This required introducing extra API to get the pdata mutability state: - p[metric|trace|log].[Metrics|Traces|Logs].IsReadOnly()
dmitryax
force-pushed
the
enable-pdata-mutation-safeguard
branch
from
October 16, 2023 15:47
7cbd3e2
to
6d9cb0f
Compare
Ok, I applied this approach on other data types |
dmitryax
added a commit
that referenced
this pull request
Oct 17, 2023
A follow-up optimization after merging #8634. There is no need to create a fanout consumer for only one read-only consumer. This introduces a behavior that closely resembles its previous state, before the introduction of the readonly/mutable states.
mx-psi
added a commit
that referenced
this pull request
Aug 2, 2024
#10632) The primary objective here was to add new test cases for the graph. However, I found that mutability assertions added in #8634 appear to be nondeterministic. Therefore, important test cases cannot be covered with them in place. This effectively removes the assertions about mutability for now. @dmitryax, I'm curious if you have better ideas here. I am thinking that perhaps it would be better to have an entirely separate set of test cases which are focused on mutability expectations. Co-authored-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
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.
This change enables the runtime assertions to catch unintentional pdata mutations in components claiming as non-mutating pdata. Without these assertions, runtime errors may still occur, but thrown by unrelated components, making it very difficult to troubleshoot.
This required introducing extra API to get the pdata mutability state:
Resolves: #6794