-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix OOM crash, when closing a transaction while Queries are still ong…
…oing (#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
- Loading branch information
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters