Skip to content

Conversation

@aywrite
Copy link
Owner

@aywrite aywrite commented Apr 15, 2020

No description provided.

aywrite and others added 2 commits April 15, 2020 16:27
Currently when fetching resources an empty array for the current list of resources is initialized and is saved in place of the existing list. If this list is accessed by one of the metrics go routines before it has been fully populated then that metric will not be populated for the missing resources.

This diff adds locking and changes the new array to only be saved once fully populated to prevent such data races from occurring.
)

type configMetric struct {
type ConfigMetric struct {
Copy link

Choose a reason for hiding this comment

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

exported type ConfigMetric should have comment or be unexported

)

type configMetric struct {
type ConfigMetric struct {
Copy link

Choose a reason for hiding this comment

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

exported type ConfigMetric should have comment or be unexported

)

type configMetric struct {
type ConfigMetric struct {
Copy link

Choose a reason for hiding this comment

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

exported type ConfigMetric should have comment or be unexported

@aywrite aywrite force-pushed the master branch 2 times, most recently from 9f51c3a to ab1963b Compare April 20, 2020 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants