pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix bogus loop logic in 013_crash_restart test's pump_until subr
3+ messages / 2 participants
[nested] [flat]

* pgsql: Fix bogus loop logic in 013_crash_restart test's pump_until subr
@ 2018-08-12 22:05 Tom Lane <tgl@sss.pgh.pa.us>
  2018-08-13 00:06 ` Re: pgsql: Fix bogus loop logic in 013_crash_restart test's pump_until subr Thomas Munro <thomas.munro@enterprisedb.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2018-08-12 22:05 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix bogus loop logic in 013_crash_restart test's pump_until subroutine.

The pump_nb() step might've already received the desired data, so we must
check for that at the top of the loop not the bottom.  Otherwise, the
call to pump() will sit with nothing to do until the timeout elapses.
pump_until then falls out with apparent success ... but the timeout has
been used up, causing the next call of pump_until to report a timeout
failure.  I believe this explains the intermittent timeout failures
we've seen in the buildfarm ever since this test went in.  I was able
to reproduce the problem on gaur semi-repeatably, and this appears to
fix it.

In passing, remove a duplicate assignment, fix one stdin-assignment to
look like the rest, and document the test's dependency on test_decoding.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d11eae09e48694ad6b4139bbb7d7b112833301f5

Modified Files
--------------
src/test/recovery/README                 | 2 ++
src/test/recovery/t/013_crash_restart.pl | 5 ++---
2 files changed, 4 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Fix bogus loop logic in 013_crash_restart test's pump_until subr
  2018-08-12 22:05 pgsql: Fix bogus loop logic in 013_crash_restart test's pump_until subr Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-08-13 00:06 ` Thomas Munro <thomas.munro@enterprisedb.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Thomas Munro @ 2018-08-13 00:06 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org

On Mon, Aug 13, 2018 at 10:05 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Fix bogus loop logic in 013_crash_restart test's pump_until subroutine.
>
> The pump_nb() step might've already received the desired data, so we must
> check for that at the top of the loop not the bottom.  Otherwise, the
> call to pump() will sit with nothing to do until the timeout elapses.
> pump_until then falls out with apparent success ... but the timeout has
> been used up, causing the next call of pump_until to report a timeout
> failure.  I believe this explains the intermittent timeout failures
> we've seen in the buildfarm ever since this test went in.  I was able
> to reproduce the problem on gaur semi-repeatably, and this appears to
> fix it.

Oh, thank you!  Occasional failures fitting this description had been
vexing me for a while in the cfbot results.

-- 
Thomas Munro
http://www.enterprisedb.com




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix bogus loop logic in 013_crash_restart test's pump_until subr
@ 2018-08-12 22:05 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2018-08-12 22:05 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix bogus loop logic in 013_crash_restart test's pump_until subroutine.

The pump_nb() step might've already received the desired data, so we must
check for that at the top of the loop not the bottom.  Otherwise, the
call to pump() will sit with nothing to do until the timeout elapses.
pump_until then falls out with apparent success ... but the timeout has
been used up, causing the next call of pump_until to report a timeout
failure.  I believe this explains the intermittent timeout failures
we've seen in the buildfarm ever since this test went in.  I was able
to reproduce the problem on gaur semi-repeatably, and this appears to
fix it.

In passing, remove a duplicate assignment, fix one stdin-assignment to
look like the rest, and document the test's dependency on test_decoding.

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/badaa0c50de0e1c8b1deb27d0a1ee00498e40002

Modified Files
--------------
src/test/recovery/README                 | 2 ++
src/test/recovery/t/013_crash_restart.pl | 5 ++---
2 files changed, 4 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-08-13 00:06 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-12 22:05 pgsql: Fix bogus loop logic in 013_crash_restart test's pump_until subr Tom Lane <tgl@sss.pgh.pa.us>
2018-08-13 00:06 ` Thomas Munro <thomas.munro@enterprisedb.com>
2018-08-12 22:05 pgsql: Fix bogus loop logic in 013_crash_restart test's pump_until subr Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox