pgsql: Still further tweaking of deadlock isolation tests. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Still further tweaking of deadlock isolation tests.
Date
Msg-id E1aUJGA-00006n-O7@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Still further tweaking of deadlock isolation tests.

It turns out that there is a second race condition in the new deadlock-hard
test: once the deadlock detector fires, it's uncertain whether step s7a8 or
step s8a1 will report first, because killing s8's transaction unblocks s7.
So far, s7 has only been seen to report first in CLOBBER_CACHE_ALWAYS
builds, but it's pretty reproducible there, and in theory it should
sometimes occur in normal builds too.  If s7 were a bit slower than usual,
that could also break the test, since the existing expected-file assumes
that we'll see s7a8 report the first time we check it after s8a1 completes.
To fix, add a post-lock delay to s7a8.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d03130d378b5fb071d231a7822784ad87268583a

Modified Files
--------------
src/test/isolation/expected/deadlock-hard.out | 9 ++++++---
src/test/isolation/specs/deadlock-hard.spec   | 6 ++++--
2 files changed, 10 insertions(+), 5 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Re-pgindent isolationtester.c.
Next
From: Tom Lane
Date:
Subject: pgsql: isolationtester: don't repeat the is-it-waiting query when retry