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 cleanup after update bug and concurrent writes to allSnapshots #52

Merged
merged 4 commits into from
Jul 23, 2019

Conversation

alexhornbake
Copy link
Contributor

Changes

  • Add Mutex to protect writes to allSnapshots related to Make snapshots concurrency safe #45
  • Differentiate update and create snapshot so that snapshot.evaluated bool can be correctly set during update.

Prior to this change, cleanup after an update would cause removal of the update ie:

=== RUN   TestCleanupUpdate
Updating snapshot `1`
Removing unused snapshot `2`

This manifested in a project when running:
go test -v ./some_package/... -- -u

@sjkaliski
Copy link
Collaborator

Thanks @alexhornbake!

@sjkaliski sjkaliski merged commit 635a098 into beme:master Jul 23, 2019
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