-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix JsonDocument thread safety. #76716
Fix JsonDocument thread safety. #76716
Conversation
Co-authored-by: stoub@microsoft.com
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis |
src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonDocumentTests.cs
Show resolved
Hide resolved
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.
Code-wise looks good, please validate if we care about perf of reading same property multiple times (I personally prefer cleaner code to micro-optimizations but we should validate this won't regress perf of some important scenario we might be missing)
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/6355724177 |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/6355726996 |
@eiriktsarpalis backporting to release/6.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix JsonDocument thread safety.
Using index info to reconstruct a base tree...
M src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs
M src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonDocumentTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonDocumentTests.cs
Auto-merging src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs
CONFLICT (content): Merge conflict in src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix JsonDocument thread safety.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@eiriktsarpalis an error occurred while backporting to release/6.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
/backport to release/6.0-staging |
Started backporting to release/6.0-staging: https://github.com/dotnet/runtime/actions/runs/6355783078 |
@eiriktsarpalis backporting to release/6.0-staging failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix JsonDocument thread safety.
Using index info to reconstruct a base tree...
M src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs
M src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonDocumentTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonDocumentTests.cs
Auto-merging src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs
CONFLICT (content): Merge conflict in src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix JsonDocument thread safety.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@eiriktsarpalis an error occurred while backporting to release/6.0-staging, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
/backport to release/7.0-staging |
Started backporting to release/7.0-staging: https://github.com/dotnet/runtime/actions/runs/6355857882 |
Co-authored-by: stoub@microsoft.com
* Fix JsonDocument thread safety. (#76716) Co-authored-by: stoub@microsoft.com * Update ServicingVersion.
Removes the cache breaking JsonDocument's thread safety.
Fixes #76440. Supersedes #76450.