pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Prevent port collisions between concurrent TAP tests
Date: Sat, 26 Nov 2022 07:40:52 -0500
Message-ID: <9b877a84-852f-8ccb-c9ba-72cb01dff266@dunslane.net> (raw)
In-Reply-To: <Y4H1RyEUsk23Tgp6@paquier.xyz>
References: <E1oxVda-000NI3-MB@gemulon.postgresql.org>
	<Y4H1RyEUsk23Tgp6@paquier.xyz>


On 2022-11-26 Sa 06:15, Michael Paquier wrote:
> Hi Andrew,
>
> On Tue, Nov 22, 2022 at 03:56:43PM +0000, Andrew Dunstan wrote:
>> Prevent port collisions between concurrent TAP tests
>>
>> Currently there is a race condition where if concurrent TAP tests both
>> test that they can open a port they will assume that it is free and use
>> it, causing one of them to fail. To prevent this we record a reservation
>> using an exclusive lock, and any TAP test that discovers a reservation
>> checks to see if the reserving process is still alive, and looks for
>> another free port if it is.
>>
>> Ports are reserved in a directory set by the environment setting
>> PG_TEST_PORT_DIR, or if that doesn't exist a subdirectory of the top
>> build directory as set by Makefile.global, or its own
>> tmp_check directory.
> Wouldn't it be better to update .gitgnore at the root of the source
> folder to discard portlock/ so as we will never include by accident in
> a commit?
>

Yes, good point. Will do.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com






view thread (9+ messages)  latest in thread

Message-ID: <9b877a84-852f-8ccb-c9ba-72cb01dff266@dunslane.net>
Permalink:  ../9b877a84-852f-8ccb-c9ba-72cb01dff266@dunslane.net/
Also on:    postgresql.org/message-id/9b877a84-852f-8ccb-c9ba-72cb01dff266@dunslane.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andrew@dunslane.net, michael@paquier.xyz
  Subject: Re: pgsql: Prevent port collisions between concurrent TAP tests
  In-Reply-To: <9b877a84-852f-8ccb-c9ba-72cb01dff266@dunslane.net>
  References: <E1oxVda-000NI3-MB@gemulon.postgresql.org> <Y4H1RyEUsk23Tgp6@paquier.xyz> <9b877a84-852f-8ccb-c9ba-72cb01dff266@dunslane.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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