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 potential race on core.activityLog #22571

Merged
merged 2 commits into from
Aug 25, 2023
Merged

Conversation

mpalmi
Copy link
Contributor

@mpalmi mpalmi commented Aug 25, 2023

This PR addresses a potential race introduced in #18809. We want to make sure the activitylog doesn't change from underneath us, so we should make sure to use the activitylog pointer we've copied in a read lock, rather than c.activityLog.

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Aug 25, 2023
@mpalmi mpalmi requested a review from miagilepner August 25, 2023 21:10
Copy link
Contributor

@raskchanky raskchanky left a comment

Choose a reason for hiding this comment

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

Wow great catch!

@mpalmi mpalmi enabled auto-merge (squash) August 25, 2023 21:14
@mpalmi mpalmi merged commit 135240d into main Aug 25, 2023
@mpalmi mpalmi deleted the use-locked-activitylog-pointer branch August 25, 2023 21:24
@github-actions
Copy link

Build Results:
All builds succeeded! ✅

@github-actions
Copy link

CI Results:
All Go tests succeeded! ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-changelog pr/no-milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants