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

Chore/refactor hash locking #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

qschmick
Copy link
Member

Refactored firstOrCreateByProcess to wrap entire process in lock via the block process

quentin.schmick added 2 commits February 24, 2022 12:12
…CreateByProcess to wrap entire process in cache
…CreateByProcess to wrap entire process in cache
@qschmick qschmick added the enhancement New feature or request label Feb 24, 2022
@qschmick qschmick self-assigned this Feb 24, 2022
@qschmick qschmick requested a review from solflare February 24, 2022 17:23
}

$lock = Cache::lock('process-stamps-hash-create-' . $hash, 12);
$lock->block(3);

Choose a reason for hiding this comment

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

I remember trying something like this before and we ran into deadlocks but I was never able to reproduce it. I think it had something to do with Observers 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants