-
Notifications
You must be signed in to change notification settings - Fork 4
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
src: don't allow parallel calls to Update() #13
Conversation
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.
Either we update these assertions or we remove them:
https://github.com/nodesource/nsolid/blob/node-v20.x-nsolid-v5.x/agents/zmq/src/zmq_agent.cc#L1648
https://github.com/nodesource/nsolid/blob/node-v20.x-nsolid-v5.x/agents/statsd/src/statsd_agent.cc#L741
https://github.com/nodesource/nsolid/blob/node-v20.x-nsolid-v5.x/agents/otlp/src/otlp_agent.cc#L411
78d31a6
to
5677f4a
Compare
5677f4a
to
1ab84d0
Compare
ThreadMetrics::Update() is supposed to be thread-safe, so we need to guard against calls being made in parallel. Return UV_EBUSY if an asynchronous Update() is already being processed. PR-URL: #13 Santiago Gimeno <santiago.gimeno@gmail.com>
Instead of updating the ASSERT with additional error info, remove them since there's nothing to do in case there's an error. PR-URL: #13 Santiago Gimeno <santiago.gimeno@gmail.com>
1ab84d0
to
24bde1e
Compare
ThreadMetrics::Update() is supposed to be thread-safe, so we need to guard against calls being made in parallel. Return UV_EBUSY if an asynchronous Update() is already being processed. PR-URL: #13 Santiago Gimeno <santiago.gimeno@gmail.com>
Instead of updating the ASSERT with additional error info, remove them since there's nothing to do in case there's an error. PR-URL: #13 Santiago Gimeno <santiago.gimeno@gmail.com>
ThreadMetrics::Update() is supposed to be thread-safe, so we need to guard against calls being made in parallel. Return UV_EBUSY if an asynchronous Update() is already being processed. PR-URL: #13 Reviewed-by: Santiago Gimeno <santiago.gimeno@gmail.com>
Instead of updating the ASSERT with additional error info, remove them since there's nothing to do in case there's an error. PR-URL: #13 Reviewed-by: Santiago Gimeno <santiago.gimeno@gmail.com>
ThreadMetrics::Update()
is supposed to be thread-safe, so we need to guard against calls being made in parallel. ReturnUV_EBUSY
if an asynchronousUpdate()
is already being processed.