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

Make a copy of the maps of MachineInfo #2491

Merged
merged 1 commit into from
Apr 13, 2020
Merged

Conversation

tedyu
Copy link
Collaborator

@tedyu tedyu commented Apr 11, 2020

For manager#GetMachineInfo(), we should duplicate the maps inside MachineInfo when copying.

This completes #2490

Signed-off-by: Ted Yu <yuzhihong@gmail.com>
@dims
Copy link
Collaborator

dims commented Apr 12, 2020

do we want to use mohae/deepcopy?

@tedyu
Copy link
Collaborator Author

tedyu commented Apr 12, 2020

mohae/deepcopy would be a new dependency.

We can wait for a few more instances where deepcopy is needed before it is adopted.

In the current formation, we don't incur cost of reflection.

@tedyu
Copy link
Collaborator Author

tedyu commented Apr 13, 2020

@dashpole
Can you take a look ?

Copy link
Collaborator

@dashpole dashpole left a comment

Choose a reason for hiding this comment

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

lgtm

@dashpole dashpole merged commit b52edf2 into google:master Apr 13, 2020
@tedyu tedyu mentioned this pull request Apr 27, 2020
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.

3 participants