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 node upsert #24127

Merged
merged 1 commit into from
Oct 4, 2024
Merged

fix data race in node upsert #24127

merged 1 commit into from
Oct 4, 2024

Commits on Oct 3, 2024

  1. fix data race in node upsert

    While testing with agents built with the race-detection option enabled, I
    encountered a data race while draining a node.
    
    When we upsert a node we copy the `NodeResources` struct and then perform a
    fixup for backwards compatibility of the topology struct. This fixup was being
    executed on the original struct and not the copy, which means we're uselessly
    fixing up the wrong struct and we're corrupting the state store in the
    process (albeit harmlessly, I suspect).
    
    Fix the data race by calling the method on the correct pointer.
    tgross committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    4ccc1b5 View commit details
    Browse the repository at this point in the history