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: prevent error about lock being acquired by the current PR #216

Merged
merged 3 commits into from
May 9, 2023

Conversation

fleroux514
Copy link
Contributor

Prevent the following

image

@@ -20,10 +21,14 @@ func (googleLock *GoogleStorageLock) Lock(transactionId int, resource string) (b
if err != nil {
fmt.Printf("failed to get lock: %v\n", err)
}
if existingLockTransactionId != nil {
if existingLockTransactionId != nil && *existingLockTransactionId != transactionId {
Copy link
Contributor

@Spartakovic Spartakovic May 9, 2023

Choose a reason for hiding this comment

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

I think this kind of logic should actually live a layer above, otherwise we will have to repeat it for each lock provider

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, fixed

@Spartakovic Spartakovic merged commit 26c1b90 into main May 9, 2023
@fleroux514 fleroux514 deleted the chore/debug-fleroux branch May 9, 2023 17:51
ben-of-codecraft pushed a commit to ben-of-codecraft/digger that referenced this pull request May 21, 2024
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