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: errors reported by the race detector #13174

Merged
merged 9 commits into from
Jun 10, 2024
Merged

Commits on Jun 7, 2024

  1. Analytics: eliminate reported race by removing globals

    cpuUsage remains as a global variable, but it is implemented using atomic values.
    
    Signed-off-by: Bryan Boreham <[email protected]>
    bboreham committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    f1f69dc View commit details
    Browse the repository at this point in the history
  2. Analytics: eliminate reported race from CAS operations

    Use two different variables to silence the report.
    
    Signed-off-by: Bryan Boreham <[email protected]>
    bboreham committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    f7cdff6 View commit details
    Browse the repository at this point in the history
  3. Bloombuild tests: eliminate race in fakeBuilder

    With a Mutex.
    
    Signed-off-by: Bryan Boreham <[email protected]>
    bboreham committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    3ad076d View commit details
    Browse the repository at this point in the history
  4. Bloombuild tests: eliminate race in fakePlannerServer

    With an atomic variable.
    
    Signed-off-by: Bryan Boreham <[email protected]>
    bboreham committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    262dc81 View commit details
    Browse the repository at this point in the history
  5. chunkenc tests: eliminate race in TestSerialization

    Avoid changing a global variable.
    
    Signed-off-by: Bryan Boreham <[email protected]>
    bboreham committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    6a40020 View commit details
    Browse the repository at this point in the history
  6. Bloomgateway tests: avoid race in dummyStore

    We cannot share querier or block objects across goroutines, because
    they have state that is updated. Instead, copy the blocks and create a
    new querier each time the mock `FetchBlocks` is called.
    
    Signed-off-by: Bryan Boreham <[email protected]>
    bboreham committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    8ed85e6 View commit details
    Browse the repository at this point in the history
  7. Bloombuild tests: avoid race on shared err variable

    Give everyone their own variable.
    
    Signed-off-by: Bryan Boreham <[email protected]>
    bboreham committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    1e7b46b View commit details
    Browse the repository at this point in the history
  8. Bloombuild: protect QueueTask against race conditions

    Using an atomic variable.
    
    Signed-off-by: Bryan Boreham <[email protected]>
    bboreham committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    6f68ebe View commit details
    Browse the repository at this point in the history
  9. Bloombuild tests: protect fakeBuilder against race conditions

    Using atomic variables.
    
    Signed-off-by: Bryan Boreham <[email protected]>
    bboreham committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    327a81e View commit details
    Browse the repository at this point in the history