-
Notifications
You must be signed in to change notification settings - Fork 43
Fix races around touching state.Group outside of the event loop #589
Conversation
There is no locking around the `state.Group` and it is modified by calls to `group()` while on the event loop. So for the time being to modify it - it is needed to be on the event loop. Also the adding of the tag isn't needed as that is done automatically by `group()`
found while testing for #542 |
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.
LGTM, but I believe we need a new issue to add Group
support back in the xk6-browser.
what do you mean? the tag Do you want an issue to make the logging of |
Never mind, I confused it with something else. The PR is good as it is 👍 |
Hey, I'm just getting around to reviewing this, apologies for the delay. I'm confused about this:
I see that you created grafana/k6#2728, which is probably why I wasn't able to make it work just now testing on the It seems unlikely that |
It does add them to the So the answer to what should xk6-browser team do is - nothing ;)
I mean ... "unlikely" yes, but depending on what the fixes for 2728 turn out to be, it might turn out that it makes more sense than anything else. In general I would argue that when emitting metrics asyncrhonously you should note/save the tags from the
|
There is no locking around the
state.Group
and it is modified by calls togroup()
while on the event loop. So for the time being to modify it - it is needed to be on the event loop.Also the adding of the tag isn't needed as that is done automatically by
group()