Re: pgsql: Prevent port collisions between concurrent TAP tests

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: pgsql: Prevent port collisions between concurrent TAP tests
Дата
Msg-id 9b877a84-852f-8ccb-c9ba-72cb01dff266@dunslane.net
обсуждение исходный текст
Ответ на Re: pgsql: Prevent port collisions between concurrent TAP tests  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pgsql: Prevent port collisions between concurrent TAP tests  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-committers
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




В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Mark two signal flags as sig_atomic_t in pgbench and pg_test_fsy
Следующее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Add portlock directory to .gitignore