Skip to content
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 YamlHelper for thread safety in multi-threaded environments. #2163

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

NiklasA
Copy link

@NiklasA NiklasA commented Sep 13, 2024

Overview

This pull request addresses the thread safety issue with YamlHelper as reported in Issue #2064. The modifications ensure that YamlHelper can be safely used in multi-threaded environments, preventing potential data races and concurrency errors.

@m1n0 Can you please review the changes and provide feedback or approve the merge if everything looks in order. Thank you!

@CLAassistant
Copy link

CLAassistant commented Sep 13, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

sonarcloud bot commented Sep 24, 2024

Copy link

sonarcloud bot commented Nov 28, 2024

@m1n0
Copy link
Contributor

m1n0 commented Nov 28, 2024

hi @NiklasA, thanks for looking into this and thanks for your patience! I am thinking that opening a thread for this is a bit of an overkill. I looked into it myself and it seems to me that all that needs to happen is to have a new yaml instance instead of reusing the same one like this #2188 - my local testing confirms it working, so I merged it to unblock a release, please test it and get back to me. We can definitely revisit your proposal for the fix if it still does not fix the issue

@NiklasA
Copy link
Author

NiklasA commented Nov 28, 2024

Hi @m1n0 ,

thank you for your detailed response! We’ve tested your approach and compared it to our existing implementation. While your solution works well, we’ve observed that its performance is approximately 10% slower than our current approach (within our existing load tests).

For context, we are using the datacontract-cli as part of our data ingestion processes, where we need to verify a significant amount of data. This might represent an edge case, but in these scenarios, performance is critical for us.

We appreciate your input and are happy to discuss potential optimizations or alternative approaches that might bridge this gap. Let us know your thoughts!

Best regards
Niklas

@NiklasA
Copy link
Author

NiklasA commented Nov 28, 2024

FYI: @pascalrosenberger, @ManbirP and @SebastianHirsch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants