You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix OOM crash, when closing a transaction while Queries are still ongoing (#1193)
When closing a transaction while queries are still running, the `_onErrorCallbacks` will cause an infinite loop which leads to an OOM crash.
Because `FAILED` is only set as a state in this function, I opted to use it as a failsafe check, to cut the recursion short.
The test triggers the OOM crash when the fix is not included, otherwise it passes in <1s on my machine.
I hope the test is ok as it is, let me know if you need any changes for this.
EDIT: Upon a bit further testing, it's not actually infinite, but just scaling exponentially.
3 simultaneous queries gets us ~3000 `_onErrorCallback` calls,
4 gets us ~32000,
5 gets us ~195000,
6 gets us ~840000,
7-12 gets us "Map maximum size exceeded"
13+ gets us the mentioned OOM
0 commit comments