-
Notifications
You must be signed in to change notification settings - Fork 135
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
Change initial sample collecting #1216
Conversation
434c2ac
to
6cf09ca
Compare
Datadog ReportBranch report: ✅ |
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.
Thanks @maciejburda! So the idea
@@ -63,20 +63,17 @@ internal final class VitalInfoSampler { | |||
self.refreshRateReader.register(self.refreshRatePublisher) | |||
self.maximumRefreshRate = maximumRefreshRate | |||
|
|||
// Take initial sample | |||
RunLoop.main.perform(inModes: [.common]) { [weak self] in |
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.
Why using [.common]
mode here?
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.
It fixes failing unit tests on CI. I'm looking for minimal possible code to mitigate the issue.
I'll open a ticket to properly investigate the threading within rum monitors scope and provide all the context there.
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.
Could we 🙏 add rationale to this change in PR description? I'm missing full context on how moving this code around tackles the problem. Did we manage do reproduce this crash locally? Ideally, we should add tests to ensure no more regression in this component.
@ncreated Adding some context from the issue I reported.
#1213 has the stacktrace for the crash that points to timer.fire()
I doubt it, seems to crash at a rate of about ~1/10,000. |
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.
Thanks for more context @cltnschlosser.
Let's go with this fix 👌.
What and why?
Potential fix for crash #1213
Chain of events:
Review checklist
Custom CI job configuration (optional)