-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix "When using QueryBuilder with Actions memory exhausts almost instantly" #15884
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
Conversation
Is this an infinite loop issue? If so, where does the infinite loop originate from? This does feel a little like a bandaid instead of addressing the root cause |
The start of the infinite loop is in $mountedRecord = $this->getLivewire()->getMountedTableActionRecord(); From what I understand:
The loop look like this
There is probably a better way to fix this, but my understanding of the whole picture is limited. It happens only when there is a mounted action in a table using QueryBuilder. |
Just submitted a reproduction repository in the original issue #12554 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do really appreciate the investigation here. I haven't looked as far into it as you have, but this fix does feel a little bit like a workaround to a flaw in the query builder. Maybe we should be working out a way to prevent the validation from running in certain places?
Also, I appreciate the tests, but there are changes I would make to them and I don't want them to prevent me from merging a bug fix. Would you mind removing the tests and testing helpers please and PRing them to v4 instead, so we have more time to do a proper review?
Yeah, I don't have your expertise of what happens in filament, but my first intuition was to fix it at the root, It was odd for me to not have a general condition to prevent recursive caching. I sure went the "easy way" on this fix 👿 On my second dive, I attempted to fix it in the query builder directly, but I wasn't sure how to keep it clean. I'll remove the tests from this PR asap, and let the original author @bzy107 push them on v4 . |
I'm having a look into this. I am currently thinking that we can refactor |
Description
This fix is related to #12554 and #15720.
This fixes the issue #12554 using the tests from #15720 (slighlty modified, but not my strong skill, so worth a double check )
Visual changes
No visual changes
Functional changes
composer cs
command.