Improving the isolationtester: fewer failures, less delay

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Improving the isolationtester: fewer failures, less delay
Date: 2021-06-15 02:57:08
Message-ID: 327948.1623725828@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

This is a followup to the conversation at [1], in which we speculated
about constraining the isolationtester's behavior by annotating the
specfiles, in order to eliminate common buildfarm failures such as [2]
and reduce the need to use long delays to stabilize the test results.

I've spent a couple days hacking on this idea, and I think it has worked
out really well. On my machine, the time needed for "make installcheck"
in src/test/isolation drops from ~93 seconds to ~26 seconds, as a result
of removing all the multiple-second delays we used before. Also,
while I'm not fool enough to claim that this will reduce the rate of
bogus failures to zero, I do think it addresses all the repeating
failures we've seen lately.

In the credit-where-credit-is-due department, this owes some inspiration
to the patch Asim Praveen offered at [3], though this takes the idea a
good bit further.

This is still WIP to some extent, as I've not spent much time looking at
specfiles other than the ones with big delays; there may be additional
improvements possible in some places. Also, I've not worried about
whether the tests pass in serializable mode, since we have problems there
already [4]. But this seemed like a good point at which to solicit
feedback and see what the cfbot thinks of it.

regards, tom lane

[1] https://www.postgresql.org/message-id/flat/2527507.1598237598%40sss.pgh.pa.us
[2] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=anole&dt=2021-06-13%2016%3A31%3A57
[3] https://www.postgresql.org/message-id/F8DC434A-9141-451C-857F-148CCA1D42AD%40vmware.com
[4] https://www.postgresql.org/message-id/324309.1623722988%40sss.pgh.pa.us

Attachment Content-Type Size
improve-isolationtester-1.patch text/x-diff 142.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-06-15 03:01:00 Re: PG 14 release notes, first draft
Previous Message Thomas Munro 2021-06-15 02:50:28 Re: Isolation tests vs. SERIALIZABLE isolation level