Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdca3693

Browse files
committed
Revert "isolationtester: don't repeat the is-it-waiting query when retrying a step."
This mostly reverts commit9c9782f.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.
1 parent3992188 commitdca3693

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

‎src/test/isolation/isolationtester.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,7 @@ run_permutation(TestSpec *testspec, int nsteps, Step **steps)
699699
* have executed additional steps in the permutation.
700700
*
701701
* When calling this function on behalf of a given step for a second or later
702-
* time, pass the STEP_RETRY flag. In this case we don't need to recheck
703-
* whether it's waiting for a lock.
702+
* time, pass the STEP_RETRY flag. This only affects the messages printed.
704703
*
705704
* If the query returns an error, the message is saved in step->errormsg.
706705
* Caller should call report_error_message shortly after this, to have it
@@ -748,14 +747,6 @@ try_complete_step(Step *step, int flags)
748747
{
749748
intntuples;
750749

751-
/*
752-
* If this is a retry, assume without checking that the step
753-
* is still blocked. This rule saves a lot of PREP_WAITING
754-
* queries and avoids any possible flappiness in the answer.
755-
*/
756-
if (flags&STEP_RETRY)
757-
return true;
758-
759750
res=PQexecPrepared(conns[0],PREP_WAITING,1,
760751
&backend_pids[step->session+1],
761752
NULL,NULL,0);
@@ -770,8 +761,9 @@ try_complete_step(Step *step, int flags)
770761

771762
if (ntuples >=1)/* waiting to acquire a lock */
772763
{
773-
printf("step %s: %s <waiting ...>\n",
774-
step->name,step->sql);
764+
if (!(flags&STEP_RETRY))
765+
printf("step %s: %s <waiting ...>\n",
766+
step->name,step->sql);
775767
return true;
776768
}
777769
/* else, not waiting */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp