closure_tree
closure_tree copied to clipboard
Use with_connection instead of calling release_connection directly
Reviving #320 under a different organization and on the latest version of master.
The call to release_connection, added in #263, might release a connection that was opened outside of has_closure_tree (if the caller is loaded dynamically in the middle of some other operation). This is especially problematic if the connection has an ongoing transaction, as that transaction will be lost.
This PR changes has_closure_tree to use with_connection instead, which only releases a connection if it was acquired. If a connection already existed prior to the call to has_closure_tree, it won't be released.
@seuros made a comment on the previous version of this PR about Databaseless setup, which I didn't understand. If someone could point me at a doc/readme/whatever I'll gladly add the necessary tests.
I recently rediscovered this PR. What can I do to help get this merged?
I recently rediscovered this PR. What can I do to help get this merged?
Can you please rebase on master branch? Thank you!
Unfortunately I no longer have access to instructure-bridge as I don't work for Instructure any more. Maybe @williamshupe can? I'm not sure if this will ping him, but unfortunately I don't have a better way of contacting him.
I no longer have access to the repository either, sorry.