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

"Deadlock detected" CI errors on upsert tests #828

Closed
killercup opened this Issue Mar 24, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@killercup
Member

killercup commented Mar 24, 2017

I've seen some CI run fail recently with

called Result::unwrap() on an Err value: DatabaseError(__Unknown, "deadlock detected")'

For example those:

Two may not be a big enough sampling size, but it seems related to upserts.

@Eijebong

This comment has been minimized.

Member

Eijebong commented Apr 19, 2017

Going to make a lot of coffee and try to solve this tonight

@Eijebong

This comment has been minimized.

Member

Eijebong commented Apr 19, 2017

Ok, after 2 hours battling with my windows VM to install launch link postgresql...

INSERT INTO users (id, name) VALUES(1, 'Sean'), (2, 'Tess')   
CREATE UNIQUE INDEX ON users (name) WHERE name != 'Tess'      

Those are the two queries creating the deadlock

The easy fix is to run tests with RUST_TEST_THREADS=1

@Eijebong

This comment has been minimized.

Member

Eijebong commented Jul 10, 2017

This has been fixed by 523ffb3

@Eijebong Eijebong closed this Jul 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment