]> granicus.if.org Git - postgresql/commit
isolationtester: don't repeat the is-it-waiting query when retrying a step.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Feb 2016 19:10:36 +0000 (14:10 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Feb 2016 19:10:36 +0000 (14:10 -0500)
commit9c9782f066e0ce5424b8706df2cce147cb78170f
treee3962fbc164099bef0d90467f454f3b28e4d0377
parenta361490806435fda6340fa13c0a881767c57c87a
isolationtester: don't repeat the is-it-waiting query when retrying a step.

If we're retrying a step, then we already decided it was blocked on a lock,
and there's no need to recheck that.  The original coding of commit
38f8bdcac4982215beb9f65a19debecaf22fd470 resulted in a large number of
is-it-waiting queries when dealing with multiple concurrently-blocked
sessions, which is fairly pointless and also results in test failures in
CLOBBER_CACHE_ALWAYS builds, where the is-it-waiting query is quite slow.

This definition also permits appending pg_sleep() calls to steps where it's
needed to control the order of finish of concurrent steps.  Before, that
did not work nicely because we'd decide that a step performing a sleep was
not blocked and hang up waiting for it to finish, rather than noticing the
completion of the concurrent step we're supposed to notice first.

In passing, revise handling of removal of completed waiting steps
to make it a bit less messy.
src/test/isolation/isolationtester.c