Ensure the uploader task is started once all required interface fields are set#155
Closed
gregomite wants to merge 1 commit into
Closed
Ensure the uploader task is started once all required interface fields are set#155gregomite wants to merge 1 commit into
gregomite wants to merge 1 commit into
Conversation
3 tasks
Member
|
@gregomite thanks for contributing the fix, due to Datadog security policy the external PR can not trigger the pipeline, I have opened another PR with your fix, also added a unit test to cover the issue. |
Contributor
Author
|
Closing in favor of #156. Thank you @ambushwork! Very much appreciated! |
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?
This is a code suggestion that serves as a possible fix for issue #154.
Motivation
The race condition described in #154 can result from the code pattern used in the Datadog SDK for starting tasks from the
init()function. This pattern may lead to race conditions. I'd like to propose a new way as a remedy. The idea is to set all the task's interface fields before the task runs. This PR outlines the best practice for doing this.Additional Notes
This is simply a proof. This change breaks the unit tests written for MultiTrackUploaderTask. I can circle back and debug that. But I wanted to communicate this code change in a timely manner.
Review checklist (to be filled by reviewers)