Skip to content
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

Fix data race in catalog/media upload reporting #288

Merged
merged 9 commits into from
Feb 17, 2020

Conversation

Didainius
Copy link
Collaborator

As part of https://github.com/terraform-providers/terraform-provider-vcd/issues/445 there is a small issue in upload reporting which may have data races. This is not a dangerous situation because all it does is prints out the progress, but still this has to be cleaned up.

Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find! Only one trivial comment in-line.

govcd/upload.go Outdated

"github.com/vmware/go-vcloud-director/v2/types/v56"
"github.com/vmware/go-vcloud-director/v2/util"
)

// mutemutexedProgress is a thread-safe structure to update and report progress during an UploadTask.
//
// Value must be read/written using Get/Set values insted of directly accessing the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incomplete comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a mess. Fixed it now.

Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Didainius Didainius self-assigned this Feb 11, 2020
@Didainius Didainius added the bug Something isn't working label Feb 11, 2020
@Didainius Didainius marked this pull request as ready for review February 14, 2020 07:43
Copy link
Contributor

@vbauzys vbauzys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@dataclouder dataclouder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Didainius Didainius merged commit 1b2c0bd into vmware:master Feb 17, 2020
@Didainius Didainius deleted the race-condition branch February 17, 2020 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cla-not-required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants