Use object_id as cache key in CachingResolver#5719
Draft
dmilisic wants to merge 1 commit into
Draft
Conversation
Member
|
Thanks for sharing this! If the workaround I mentioned in #5718 (comment) is not enough, this provides us a really good hint where the interaction of the code in the Ruby VM might be going wrong... 👀 |
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?
Fix #5718 Segmentation fault in CachingResolver
Motivation:
Ocasional segfaults after upgrading from ddtrace (v1) to datadog (v2)
Change log entry
Additional Notes:
When using rails with multiple threads, each thread will have its own connection configuration Hash with a different
object_id. So we can expect more cache entries, but we eliminate the overhead of comparing hashes.We're running this fix in production for ~2 weeks without a single segfault. Previously, segfaults ocurred on a daily basis.
How to test the change?
Segmentation faults are difficult to reproduce. There should be no change in behaviour.