Re: Add isolation test template in injection_points for wait/wakeup/detach
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-10-29T07:59:31Z
Lists: pgsql-hackers
Hi, On Tue, Oct 29, 2024 at 01:12:25PM +0900, Michael Paquier wrote: > On Mon, Oct 28, 2024 at 07:17:28AM +0000, Bertrand Drouvot wrote: > > I think that we can not be 100% sure that the s1 wait will finish before the > > s2 detach (easy reproducible with gdb attached on s1 or an hardcoded sleep) and > > that other OS could also report the test as failing for the same reason. > > Yes, the only safe thing we can do in this test is to let the wakeup2 > be last, as we are sure that the isolationtester is going to keep at > s2 to finish the call of the wakeup function before moving on with > checking the end of the wait. Agree. > > It's not ideal, but instead of removing this first permutation test what about > > adding a "sleep2" step in it (doing say, SELECT pg_sleep(1);) and call this > > new step before the detach2 one? > > There is no real guarantee of stability. Right. > 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). > What we have here seems like just contention of Cirrus with the > FreeBSD hosts while there is much more stability with the linux hosts. That sounds like it, agree. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
Commits
-
injection_points: Tweak more permutation in isolation test "basic"
- 926c7fce0360 18.0 landed
-
injection_points: Re-enable permutation in isolation test "basic"
- 9e020050b8fa 18.0 landed
-
injection_points: Improve comment about disabled isolation permutation
- baa1ae04299f 18.0 landed
-
injection_points: Disable one permutation in isolation test "basic"
- 9f00edc22888 18.0 landed
-
injection_points: Add basic isolation test
- a7800cf498a3 18.0 landed