src: don't allow parallel calls to Update()#13
Merged
trevnorris merged 2 commits intonode-v20.x-nsolid-v5.xfrom Oct 30, 2023
Merged
src: don't allow parallel calls to Update()#13trevnorris merged 2 commits intonode-v20.x-nsolid-v5.xfrom
trevnorris merged 2 commits intonode-v20.x-nsolid-v5.xfrom
Conversation
santigimeno
requested changes
Oct 30, 2023
Member
santigimeno
left a comment
There was a problem hiding this comment.
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
santigimeno
approved these changes
Oct 30, 2023
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
trevnorris
added a commit
that referenced
this pull request
Oct 30, 2023
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>
trevnorris
added a commit
that referenced
this pull request
Oct 30, 2023
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>
trevnorris
added a commit
that referenced
this pull request
Dec 7, 2023
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>
trevnorris
added a commit
that referenced
this pull request
Dec 7, 2023
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>
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.
ThreadMetrics::Update()is supposed to be thread-safe, so we need to guard against calls being made in parallel. ReturnUV_EBUSYif an asynchronousUpdate()is already being processed.