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

[9.x] Fix unique locking on broadcast events #43516

Merged
merged 7 commits into from Aug 3, 2022

Conversation

DougSisk
Copy link
Contributor

@DougSisk DougSisk commented Aug 2, 2022

This is a fix for #43416. The lock was not being acquired because the broadcast manager was pushing straight to the queue and not using the dispatcher. Acquiring the lock within the queue method seems like the best option, as rewriting to use a dispatcher seems like it could cause a ton of headaches.

@taylorotwell
Copy link
Member

taylorotwell commented Aug 2, 2022

Now uniqueVia is not respected right?

@DougSisk
Copy link
Contributor Author

DougSisk commented Aug 2, 2022

I think we can eliminate the UniqueBroadcastEvent, as it's not needed since we can generate the lock key from the event. I think there's also a potential issue with having uniqueVia be a property, as I believe the cache repository can't be serialized.

@taylorotwell taylorotwell merged commit 183d38f into laravel:9.x Aug 3, 2022
16 checks passed
Ken-vdE pushed a commit to Ken-vdE/framework that referenced this pull request Aug 9, 2022
* Fix broadcasting locks

* Update BroadcastManager.php

* Respect event uniqueVia

* Remove UniqueBroadcastEvent, use event instead

* clean up logic

* formatting

* formatting

Co-authored-by: Taylor Otwell <taylor@laravel.com>
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.

None yet

2 participants