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
I encountered a strange bug with an in-memory database where I was accidentally leaving transactions uncommitted. To my surprise, it turns out that every new connection creates a brand-spanking new in-memory database, which meant that I wasn't running queries against the database I thought I was, but a blank database, resulting in some perplexing errors involving missing data that I was sure was actually there.
I eventually fixed the bug by eliminating an extraneous Begin() that had crept into my code, but I can't imagine a situation where "please run this query against a fresh database" would be desirable. Could this behavior at the very least be documented somewhere? It'd be nice if perhaps the driver could somehow limit the number of concurrent connections to in-memory databases to one, but you might still need to document this behavior so people don't get confused when they run into a deadlock caused by connection that was left open.
The text was updated successfully, but these errors were encountered:
I encountered a strange bug with an in-memory database where I was accidentally leaving transactions uncommitted. To my surprise, it turns out that every new connection creates a brand-spanking new in-memory database, which meant that I wasn't running queries against the database I thought I was, but a blank database, resulting in some perplexing errors involving missing data that I was sure was actually there.
I eventually fixed the bug by eliminating an extraneous Begin() that had crept into my code, but I can't imagine a situation where "please run this query against a fresh database" would be desirable. Could this behavior at the very least be documented somewhere? It'd be nice if perhaps the driver could somehow limit the number of concurrent connections to in-memory databases to one, but you might still need to document this behavior so people don't get confused when they run into a deadlock caused by connection that was left open.
The text was updated successfully, but these errors were encountered: