Re: Add isolation test template in injection_points for wait/wakeup/detach

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add isolation test template in injection_points for wait/wakeup/detach
Date: 2024-10-29 14:06:11
Message-ID: ZyDr0yUJp9Z5X2cb@ip-10-97-1-34.eu-west-3.compute.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, Oct 29, 2024 at 05:20:42PM +0900, Michael Paquier wrote:
> On Tue, Oct 29, 2024 at 07:59:31AM +0000, Bertrand Drouvot wrote:
> > On Tue, Oct 29, 2024 at 01:12:25PM +0900, Michael Paquier wrote:
> >> Under a wait of N seconds,
> >> we could still have environments where the wait() could remain stuck
> >> more than N seconds between the moment the condition variable is woken
> >> up and the result of the wait() is reported back to the client. And
> >> hardcoded sleeps make the test slower even on fast machines.
> >
> > Yeah, not ideal so better to keep the test as it is currently (after your
> > refactoring).
>
> Backpedalling a bit on that.. Perhaps it would be useful to keep the
> permutation as disabled in the test and to update the comment in
> basic.spec to tell that this had better be avoided when implementing a
> test if the timing of the return value of a SQL wait() cannot be
> strictly controlled? And also say that putting the wakeup() should be
> last for simple permutations? The point of this spec is also to
> document some good and bad practices.

Yeah, agree that it would make sense to document in the test what has been
discovered here.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2024-10-29 14:08:42 Re: Replace current implementations in crypt() and gen_salt() to OpenSSL
Previous Message Bertrand Drouvot 2024-10-29 14:03:02 Re: define pg_structiszero(addr, s, r)