-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make pool read-only, with a single write connection. #1517
Conversation
23c6bb6
to
b5205c1
Compare
7d2c128
to
0282c31
Compare
c5ed9b2
to
d547dc8
Compare
d547dc8
to
d3fa5b9
Compare
ce36687
to
a4a521c
Compare
14e2d4b
to
39230c7
Compare
// wasm does not have threads | ||
#[cfg_attr(not(target_arch = "wasm32"), tokio::test)] | ||
#[cfg(not(target_arch = "wasm32"))] | ||
async fn test_transaction_rollback() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted this test since the barriers in this test were trying to force something that should be impossible now and was causing a deadlock.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, because the barriers would never progress since the transaction never finishes. So we would only deadlock IRL if we somehow had a transaction that never finishes or infinity-loops, which shouldn't happen w/o async or a bug
|
||
let conn = self.conn_ref(); | ||
let _guard = conn.start_transaction::<Db>()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now that async transactions are gone and our connection is a mutex, can we use diesels transaction function?
Looks good! |
No description provided.