summaryrefslogtreecommitdiff
path: root/src/test/isolation/isolationtester.c
diff options
context:
space:
mode:
authorTom Lane2016-02-12 22:12:23 +0000
committerTom Lane2016-02-12 22:12:23 +0000
commitdca369320f6023b55feb49f281d394181fc57903 (patch)
tree3d56cde1f93b483f6d179cbbc49c549a90cb86f1 /src/test/isolation/isolationtester.c
parent3992188c2a8702bcb92140a840b5378b27468921 (diff)
Revert "isolationtester: don't repeat the is-it-waiting query when retrying a step."
This mostly reverts commit 9c9782f066e0ce5424b8706df2cce147cb78170f. I left in the parts that rearranged removal of completed waiting steps; but the idea of not rechecking a step's blocked-ness isn't working.
Diffstat (limited to 'src/test/isolation/isolationtester.c')
-rw-r--r--src/test/isolation/isolationtester.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/test/isolation/isolationtester.c b/src/test/isolation/isolationtester.c
index da5ac9ee6c5..0a9d25ce9ca 100644
--- a/src/test/isolation/isolationtester.c
+++ b/src/test/isolation/isolationtester.c
@@ -699,8 +699,7 @@ run_permutation(TestSpec *testspec, int nsteps, Step **steps)
* have executed additional steps in the permutation.
*
* When calling this function on behalf of a given step for a second or later
- * time, pass the STEP_RETRY flag. In this case we don't need to recheck
- * whether it's waiting for a lock.
+ * time, pass the STEP_RETRY flag. This only affects the messages printed.
*
* If the query returns an error, the message is saved in step->errormsg.
* Caller should call report_error_message shortly after this, to have it
@@ -748,14 +747,6 @@ try_complete_step(Step *step, int flags)
{
int ntuples;
- /*
- * If this is a retry, assume without checking that the step
- * is still blocked. This rule saves a lot of PREP_WAITING
- * queries and avoids any possible flappiness in the answer.
- */
- if (flags & STEP_RETRY)
- return true;
-
res = PQexecPrepared(conns[0], PREP_WAITING, 1,
&backend_pids[step->session + 1],
NULL, NULL, 0);
@@ -770,8 +761,9 @@ try_complete_step(Step *step, int flags)
if (ntuples >= 1) /* waiting to acquire a lock */
{
- printf("step %s: %s <waiting ...>\n",
- step->name, step->sql);
+ if (!(flags & STEP_RETRY))
+ printf("step %s: %s <waiting ...>\n",
+ step->name, step->sql);
return true;
}
/* else, not waiting */