Fix transaction deadlock in client pool#22
Merged
Conversation
Contributor
Author
|
@petersamokhin Did the bug also occur with non-transactional code? I couldn't find anything thru non-transactional fuzzing |
|
@quinchs yes, it happened even outside transactions 🥲 |
quinchs
added a commit
that referenced
this pull request
Oct 25, 2023
commit 8c07ee4 Author: Quin Lynch <lynchquin@gmail.com> Date: Wed Oct 25 14:27:48 2023 -0300 Update ChannelDuplexer.java commit fdd6101 Merge: 28cebea dd661c6 Author: Quin Lynch <lynchquin@gmail.com> Date: Wed Oct 25 14:21:57 2023 -0300 Merge branch 'master' into feat/protocol-v2 commit dd661c6 Author: Quin Lynch <lynchquin@gmail.com> Date: Fri Oct 20 13:18:18 2023 -0300 meta: 0.2.4-SNAPSHOT commit 81ee0d1 Author: Quin Lynch <lynchquin@gmail.com> Date: Fri Oct 20 13:17:59 2023 -0300 meta: 0.2.3 commit 4647a17 Author: Quin Lynch <49576606+quinchs@users.noreply.github.com> Date: Fri Oct 20 12:46:25 2023 -0300 Fix reconnection deadlock (#23) commit 3be463b Author: Quin Lynch <lynchquin@gmail.com> Date: Tue Oct 17 21:10:13 2023 -0300 fix the reconnect logic commit dfb97dd Author: Quin Lynch <lynchquin@gmail.com> Date: Tue Oct 17 20:49:55 2023 -0300 remove duplicate reconnect behavior Binding would call `reconnect()` which then gets reconnected on duplexer level just to sent Terminate and hang :cry: commit 6e52959 Author: Quin Lynch <lynchquin@gmail.com> Date: Sun Oct 15 13:36:14 2023 -0300 Fix idle clients causing exceptions commit a89822d Author: Quin Lynch <lynchquin@gmail.com> Date: Sat Oct 14 21:52:20 2023 -0300 Fix cloud connection logic commit 5bb3ba2 Author: Quin Lynch <lynchquin@gmail.com> Date: Tue Oct 10 13:09:03 2023 -0300 meta: 0.2.3-SNAPSHOT commit ca6ad29 Author: Quin Lynch <lynchquin@gmail.com> Date: Tue Oct 10 12:58:18 2023 -0300 meta: 0.2.2 commit 13bed4d Author: Quin Lynch <49576606+quinchs@users.noreply.github.com> Date: Tue Oct 10 12:55:27 2023 -0300 Fix transaction deadlock in client pool (#22) commit 28cebea Merge: dbd4099 7fa55fa Author: Quin Lynch <lynchquin@gmail.com> Date: Tue Sep 26 13:48:57 2023 -0300 update from master commit 7fa55fa Author: Quin Lynch <49576606+quinchs@users.noreply.github.com> Date: Tue Sep 26 13:28:29 2023 -0300 Fix primitive deserialization on datatypes (#20) commit 43da5b2 Author: Quin Lynch <49576606+quinchs@users.noreply.github.com> Date: Thu Sep 21 15:55:04 2023 -0300 Update README.md closes #19 commit 2a54501 Author: Quin Lynch <lynchquin@gmail.com> Date: Wed Sep 13 11:23:59 2023 -0300 Make EdgeDBClient implement AutoCloseable
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When running a transaction with the
transaction()method onEdgeDBClient, a client is fetched or created from the underlying client pool. The client from the pool is used to run the entire transaction block, the issue is that the binding didn't return the client back to the pool after use.This PR fixes this by explicitly calling the
closemethod on the client after the transaction block completes (successfully or not) via thecomposeWithmethod.Fixes #21