closure_tree icon indicating copy to clipboard operation
closure_tree copied to clipboard

Use with_connection instead of calling release_connection directly

Open jmarianer opened this issue 6 years ago • 4 comments
trafficstars

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.

jmarianer avatar Dec 21 '18 20:12 jmarianer

I recently rediscovered this PR. What can I do to help get this merged?

jmarianer avatar Jun 13 '19 22:06 jmarianer

I recently rediscovered this PR. What can I do to help get this merged?

Can you please rebase on master branch? Thank you!

n-rodriguez avatar Jan 10 '21 18:01 n-rodriguez

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.

jmarianer avatar Jan 31 '21 03:01 jmarianer

I no longer have access to the repository either, sorry.

williamshupe avatar Feb 01 '21 17:02 williamshupe