pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Use annotations to reduce instability of isolation-test results.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Use annotations to reduce instability of isolation-test results.
@ 2021-06-23 01:43  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2021-06-23 01:43 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Use annotations to reduce instability of isolation-test results.

We've long contended with isolation test results that aren't entirely
stable.  Some test scripts insert long delays to try to force stable
results, which is not terribly desirable; but other erratic failure
modes remain, causing unrepeatable buildfarm failures.  I've spent a
fair amount of time trying to solve this by improving the server-side
support code, without much success: that way is fundamentally unable
to cope with diffs that stem from chance ordering of arrival of
messages from different server processes.

We can improve matters on the client side, however, by annotating
the test scripts themselves to show the desired reporting order
of events that might occur in different orders.  This patch adds
three types of annotations to deal with (a) test steps that might or
might not complete their waits before the isolationtester can see them
waiting; (b) test steps in different sessions that can legitimately
complete in either order; and (c) NOTIFY messages that might arrive
before or after the completion of a step in another session.  We might
need more annotation types later, but this seems to be enough to deal
with the instabilities we've seen in the buildfarm.  It also lets us
get rid of all the long delays that were previously used, cutting more
than a minute off the runtime of the isolation tests.

Back-patch to all supported branches, because the buildfarm
instabilities affect all the branches, and because it seems desirable
to keep isolationtester's capabilities the same across all branches
to simplify possible future back-patching of tests.

Discussion: https://postgr.es/m/327948.1623725828@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/741d7f1047fe52da7ced6fa9cea661ce9320c8d4

Modified Files
--------------
.../test_decoding/expected/concurrent_ddl_dml.out  |   2 +-
src/test/isolation/README                          |  85 ++-
src/test/isolation/expected/alter-table-3.out      |  32 +-
src/test/isolation/expected/alter-table-4.out      |   2 +-
src/test/isolation/expected/deadlock-hard.out      |   2 +-
src/test/isolation/expected/deadlock-simple.out    |   2 +-
.../expected/detach-partition-concurrently-3.out   | 200 +++---
.../expected/detach-partition-concurrently-4.out   | 118 ++--
.../isolation/expected/eval-plan-qual-trigger.out  |  18 +-
src/test/isolation/expected/eval-plan-qual.out     |   6 +-
src/test/isolation/expected/fk-deadlock2_1.out     |  12 +-
src/test/isolation/expected/fk-deadlock2_2.out     |  12 +-
src/test/isolation/expected/fk-deadlock_1.out      |  12 +-
src/test/isolation/expected/fk-partitioned-1.out   |  12 +-
src/test/isolation/expected/fk-partitioned-2.out   |  12 +-
.../expected/insert-conflict-do-nothing-2.out      |   8 +-
.../expected/insert-conflict-specconflict.out      |   4 +-
.../expected/lock-committed-keyupdate.out          |  24 +-
.../isolation/expected/lock-update-delete_1.out    |   8 +-
src/test/isolation/expected/multiple-cic.out       |   3 +-
src/test/isolation/expected/multiple-cic_1.out     |  20 -
.../isolation/expected/multixact-no-forget_1.out   |   4 +-
src/test/isolation/expected/nowait-4.out           |   2 +-
src/test/isolation/expected/nowait-4_1.out         |   2 +-
src/test/isolation/expected/nowait-5.out           |   2 +-
.../expected/partition-concurrent-attach.out       |   6 +-
.../isolation/expected/partition-key-update-1.out  |  14 +-
.../isolation/expected/partition-key-update-3.out  |  12 +-
.../isolation/expected/propagate-lock-delete.out   |  16 +-
.../isolation/expected/read-write-unique-2.out     |   2 +-
.../isolation/expected/read-write-unique-3.out     |   2 +-
.../isolation/expected/read-write-unique-4.out     |   6 +-
src/test/isolation/expected/read-write-unique.out  |   2 +-
src/test/isolation/expected/sequence-ddl.out       |   2 +-
src/test/isolation/expected/skip-locked-4_1.out    |   2 +-
src/test/isolation/expected/timeouts.out           |  16 +-
src/test/isolation/expected/tuplelock-update.out   |  21 +-
src/test/isolation/isolationtester.c               | 780 +++++++++++++--------
src/test/isolation/isolationtester.h               |  47 +-
src/test/isolation/specparse.y                     |  87 ++-
src/test/isolation/specs/deadlock-hard.spec        |  12 +-
src/test/isolation/specs/deadlock-soft-2.spec      |  15 +-
.../specs/detach-partition-concurrently-3.spec     |  50 +-
.../specs/detach-partition-concurrently-4.spec     |  34 +-
.../specs/insert-conflict-specconflict.spec        |  16 +-
src/test/isolation/specs/multiple-cic.spec         |   5 +-
src/test/isolation/specs/timeouts.spec             |  28 +-
src/test/isolation/specs/tuplelock-update.spec     |   9 +-
src/test/isolation/specscanner.l                   |  12 +
49 files changed, 1077 insertions(+), 723 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Use annotations to reduce instability of isolation-test results.
@ 2021-06-23 01:43  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2021-06-23 01:43 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Use annotations to reduce instability of isolation-test results.

We've long contended with isolation test results that aren't entirely
stable.  Some test scripts insert long delays to try to force stable
results, which is not terribly desirable; but other erratic failure
modes remain, causing unrepeatable buildfarm failures.  I've spent a
fair amount of time trying to solve this by improving the server-side
support code, without much success: that way is fundamentally unable
to cope with diffs that stem from chance ordering of arrival of
messages from different server processes.

We can improve matters on the client side, however, by annotating
the test scripts themselves to show the desired reporting order
of events that might occur in different orders.  This patch adds
three types of annotations to deal with (a) test steps that might or
might not complete their waits before the isolationtester can see them
waiting; (b) test steps in different sessions that can legitimately
complete in either order; and (c) NOTIFY messages that might arrive
before or after the completion of a step in another session.  We might
need more annotation types later, but this seems to be enough to deal
with the instabilities we've seen in the buildfarm.  It also lets us
get rid of all the long delays that were previously used, cutting more
than a minute off the runtime of the isolation tests.

Back-patch to all supported branches, because the buildfarm
instabilities affect all the branches, and because it seems desirable
to keep isolationtester's capabilities the same across all branches
to simplify possible future back-patching of tests.

Discussion: https://postgr.es/m/327948.1623725828@sss.pgh.pa.us

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e2cde85ef2c38ab9cc1ff7190ded7433f637b014

Modified Files
--------------
.../test_decoding/expected/concurrent_ddl_dml.out  |   2 +-
src/test/isolation/README                          |  85 ++-
src/test/isolation/expected/alter-table-3.out      |  32 +-
src/test/isolation/expected/alter-table-4.out      |   2 +-
src/test/isolation/expected/deadlock-hard.out      |   2 +-
src/test/isolation/expected/deadlock-simple.out    |   2 +-
.../isolation/expected/eval-plan-qual-trigger.out  |  18 +-
src/test/isolation/expected/eval-plan-qual.out     |   6 +-
src/test/isolation/expected/fk-deadlock2_1.out     |  12 +-
src/test/isolation/expected/fk-deadlock2_2.out     |  12 +-
src/test/isolation/expected/fk-deadlock_1.out      |  12 +-
src/test/isolation/expected/fk-partitioned-1.out   |  12 +-
src/test/isolation/expected/fk-partitioned-2.out   |  12 +-
.../expected/insert-conflict-do-nothing-2.out      |   8 +-
.../expected/insert-conflict-specconflict.out      |   4 +-
.../expected/lock-committed-keyupdate.out          |  24 +-
.../isolation/expected/lock-update-delete_1.out    |  12 +-
src/test/isolation/expected/multiple-cic.out       |   3 +-
src/test/isolation/expected/multiple-cic_1.out     |  20 -
.../isolation/expected/multixact-no-forget_1.out   |   4 +-
src/test/isolation/expected/nowait-4.out           |   2 +-
src/test/isolation/expected/nowait-4_1.out         |   2 +-
src/test/isolation/expected/nowait-5.out           |   2 +-
.../expected/partition-concurrent-attach.out       |   6 +-
.../isolation/expected/partition-key-update-1.out  |  14 +-
.../isolation/expected/partition-key-update-3.out  |  12 +-
.../isolation/expected/propagate-lock-delete.out   |  16 +-
.../isolation/expected/read-write-unique-2.out     |   2 +-
.../isolation/expected/read-write-unique-3.out     |   2 +-
.../isolation/expected/read-write-unique-4.out     |   6 +-
src/test/isolation/expected/read-write-unique.out  |   2 +-
src/test/isolation/expected/sequence-ddl.out       |   2 +-
src/test/isolation/expected/skip-locked-4_1.out    |   2 +-
src/test/isolation/expected/timeouts.out           |  16 +-
src/test/isolation/expected/tuplelock-update.out   |  21 +-
src/test/isolation/isolationtester.c               | 782 +++++++++++++--------
src/test/isolation/isolationtester.h               |  47 +-
src/test/isolation/specparse.y                     |  87 ++-
src/test/isolation/specs/deadlock-hard.spec        |  12 +-
src/test/isolation/specs/deadlock-soft-2.spec      |  15 +-
.../specs/insert-conflict-specconflict.spec        |  16 +-
src/test/isolation/specs/multiple-cic.spec         |   5 +-
src/test/isolation/specs/timeouts.spec             |  28 +-
src/test/isolation/specs/tuplelock-update.spec     |   9 +-
src/test/isolation/specscanner.l                   |  12 +
45 files changed, 890 insertions(+), 514 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Use annotations to reduce instability of isolation-test results.
@ 2021-06-23 01:43  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2021-06-23 01:43 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Use annotations to reduce instability of isolation-test results.

We've long contended with isolation test results that aren't entirely
stable.  Some test scripts insert long delays to try to force stable
results, which is not terribly desirable; but other erratic failure
modes remain, causing unrepeatable buildfarm failures.  I've spent a
fair amount of time trying to solve this by improving the server-side
support code, without much success: that way is fundamentally unable
to cope with diffs that stem from chance ordering of arrival of
messages from different server processes.

We can improve matters on the client side, however, by annotating
the test scripts themselves to show the desired reporting order
of events that might occur in different orders.  This patch adds
three types of annotations to deal with (a) test steps that might or
might not complete their waits before the isolationtester can see them
waiting; (b) test steps in different sessions that can legitimately
complete in either order; and (c) NOTIFY messages that might arrive
before or after the completion of a step in another session.  We might
need more annotation types later, but this seems to be enough to deal
with the instabilities we've seen in the buildfarm.  It also lets us
get rid of all the long delays that were previously used, cutting more
than a minute off the runtime of the isolation tests.

Back-patch to all supported branches, because the buildfarm
instabilities affect all the branches, and because it seems desirable
to keep isolationtester's capabilities the same across all branches
to simplify possible future back-patching of tests.

Discussion: https://postgr.es/m/327948.1623725828@sss.pgh.pa.us

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f228c401b86bd68570c9d8f6348bc0a4e66b2325

Modified Files
--------------
.../test_decoding/expected/concurrent_ddl_dml.out  |   2 +-
src/test/isolation/README                          |  85 ++-
src/test/isolation/expected/alter-table-3.out      |  32 +-
src/test/isolation/expected/alter-table-4.out      |   2 +-
src/test/isolation/expected/deadlock-hard.out      |   2 +-
src/test/isolation/expected/deadlock-simple.out    |   2 +-
.../isolation/expected/eval-plan-qual-trigger.out  |   6 +-
src/test/isolation/expected/eval-plan-qual.out     |   6 +-
src/test/isolation/expected/fk-deadlock2_1.out     |  12 +-
src/test/isolation/expected/fk-deadlock2_2.out     |  12 +-
src/test/isolation/expected/fk-deadlock_1.out      |  12 +-
src/test/isolation/expected/fk-partitioned-1.out   |  12 +-
src/test/isolation/expected/fk-partitioned-2.out   |  12 +-
.../expected/insert-conflict-do-nothing-2.out      |   8 +-
.../expected/lock-committed-keyupdate.out          |  24 +-
.../isolation/expected/lock-update-delete_1.out    |  12 +-
src/test/isolation/expected/multiple-cic.out       |   3 +-
src/test/isolation/expected/multiple-cic_1.out     |  20 -
.../isolation/expected/multixact-no-forget_1.out   |   4 +-
src/test/isolation/expected/nowait-4.out           |   2 +-
src/test/isolation/expected/nowait-4_1.out         |   2 +-
src/test/isolation/expected/nowait-5.out           |   2 +-
.../expected/partition-concurrent-attach.out       |   6 +-
.../isolation/expected/partition-key-update-1.out  |  14 +-
.../isolation/expected/partition-key-update-3.out  |  12 +-
.../isolation/expected/propagate-lock-delete.out   |  16 +-
.../isolation/expected/read-write-unique-2.out     |   2 +-
.../isolation/expected/read-write-unique-3.out     |   2 +-
.../isolation/expected/read-write-unique-4.out     |   6 +-
src/test/isolation/expected/read-write-unique.out  |   2 +-
src/test/isolation/expected/sequence-ddl.out       |   2 +-
src/test/isolation/expected/skip-locked-4_1.out    |   2 +-
src/test/isolation/expected/timeouts.out           |  16 +-
src/test/isolation/expected/tuplelock-update.out   |  21 +-
src/test/isolation/isolationtester.c               | 782 +++++++++++++--------
src/test/isolation/isolationtester.h               |  47 +-
src/test/isolation/specparse.y                     |  87 ++-
src/test/isolation/specs/deadlock-hard.spec        |  12 +-
src/test/isolation/specs/deadlock-soft-2.spec      |  15 +-
src/test/isolation/specs/multiple-cic.spec         |   5 +-
src/test/isolation/specs/timeouts.spec             |  28 +-
src/test/isolation/specs/tuplelock-update.spec     |   9 +-
src/test/isolation/specscanner.l                   |  12 +
43 files changed, 871 insertions(+), 501 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Use annotations to reduce instability of isolation-test results.
@ 2021-06-23 01:43  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2021-06-23 01:43 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Use annotations to reduce instability of isolation-test results.

We've long contended with isolation test results that aren't entirely
stable.  Some test scripts insert long delays to try to force stable
results, which is not terribly desirable; but other erratic failure
modes remain, causing unrepeatable buildfarm failures.  I've spent a
fair amount of time trying to solve this by improving the server-side
support code, without much success: that way is fundamentally unable
to cope with diffs that stem from chance ordering of arrival of
messages from different server processes.

We can improve matters on the client side, however, by annotating
the test scripts themselves to show the desired reporting order
of events that might occur in different orders.  This patch adds
three types of annotations to deal with (a) test steps that might or
might not complete their waits before the isolationtester can see them
waiting; (b) test steps in different sessions that can legitimately
complete in either order; and (c) NOTIFY messages that might arrive
before or after the completion of a step in another session.  We might
need more annotation types later, but this seems to be enough to deal
with the instabilities we've seen in the buildfarm.  It also lets us
get rid of all the long delays that were previously used, cutting more
than a minute off the runtime of the isolation tests.

Back-patch to all supported branches, because the buildfarm
instabilities affect all the branches, and because it seems desirable
to keep isolationtester's capabilities the same across all branches
to simplify possible future back-patching of tests.

Discussion: https://postgr.es/m/327948.1623725828@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a1417e4378b9a3a4e896766331eb45a1f4de0cfd

Modified Files
--------------
.../test_decoding/expected/concurrent_ddl_dml.out  |   2 +-
src/test/isolation/README                          |  85 ++-
src/test/isolation/expected/alter-table-3.out      |  32 +-
src/test/isolation/expected/alter-table-4.out      |   2 +-
src/test/isolation/expected/deadlock-hard.out      |   2 +-
src/test/isolation/expected/deadlock-simple.out    |   2 +-
.../isolation/expected/eval-plan-qual-trigger.out  |   6 +-
src/test/isolation/expected/fk-deadlock2_1.out     |  12 +-
src/test/isolation/expected/fk-deadlock2_2.out     |  12 +-
src/test/isolation/expected/fk-deadlock_1.out      |  12 +-
.../expected/insert-conflict-do-nothing-2.out      |   8 +-
.../expected/lock-committed-keyupdate.out          |  24 +-
.../isolation/expected/lock-update-delete_1.out    |  12 +-
src/test/isolation/expected/multiple-cic.out       |   3 +-
src/test/isolation/expected/multiple-cic_1.out     |  20 -
.../isolation/expected/multixact-no-forget_1.out   |   4 +-
src/test/isolation/expected/nowait-4.out           |   2 +-
src/test/isolation/expected/nowait-4_1.out         |   2 +-
src/test/isolation/expected/nowait-5.out           |   2 +-
.../isolation/expected/partition-key-update-1.out  |  12 +-
.../isolation/expected/partition-key-update-3.out  |  12 +-
.../isolation/expected/propagate-lock-delete.out   |  16 +-
.../isolation/expected/read-write-unique-2.out     |   2 +-
.../isolation/expected/read-write-unique-3.out     |   2 +-
.../isolation/expected/read-write-unique-4.out     |   6 +-
src/test/isolation/expected/read-write-unique.out  |   2 +-
src/test/isolation/expected/sequence-ddl.out       |   2 +-
src/test/isolation/expected/skip-locked-4_1.out    |   2 +-
src/test/isolation/expected/timeouts.out           |  16 +-
src/test/isolation/expected/tuplelock-update.out   |  21 +-
src/test/isolation/isolationtester.c               | 782 +++++++++++++--------
src/test/isolation/isolationtester.h               |  47 +-
src/test/isolation/specparse.y                     |  87 ++-
src/test/isolation/specs/deadlock-hard.spec        |  12 +-
src/test/isolation/specs/deadlock-soft-2.spec      |  15 +-
src/test/isolation/specs/multiple-cic.spec         |   5 +-
src/test/isolation/specs/timeouts.spec             |  28 +-
src/test/isolation/specs/tuplelock-update.spec     |   9 +-
src/test/isolation/specscanner.l                   |  12 +
39 files changed, 852 insertions(+), 482 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Use annotations to reduce instability of isolation-test results.
@ 2021-06-23 01:43  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2021-06-23 01:43 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Use annotations to reduce instability of isolation-test results.

We've long contended with isolation test results that aren't entirely
stable.  Some test scripts insert long delays to try to force stable
results, which is not terribly desirable; but other erratic failure
modes remain, causing unrepeatable buildfarm failures.  I've spent a
fair amount of time trying to solve this by improving the server-side
support code, without much success: that way is fundamentally unable
to cope with diffs that stem from chance ordering of arrival of
messages from different server processes.

We can improve matters on the client side, however, by annotating
the test scripts themselves to show the desired reporting order
of events that might occur in different orders.  This patch adds
three types of annotations to deal with (a) test steps that might or
might not complete their waits before the isolationtester can see them
waiting; (b) test steps in different sessions that can legitimately
complete in either order; and (c) NOTIFY messages that might arrive
before or after the completion of a step in another session.  We might
need more annotation types later, but this seems to be enough to deal
with the instabilities we've seen in the buildfarm.  It also lets us
get rid of all the long delays that were previously used, cutting more
than a minute off the runtime of the isolation tests.

Back-patch to all supported branches, because the buildfarm
instabilities affect all the branches, and because it seems desirable
to keep isolationtester's capabilities the same across all branches
to simplify possible future back-patching of tests.

Discussion: https://postgr.es/m/327948.1623725828@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1f32b789de941327fdbd528077597f2b721e9a6b

Modified Files
--------------
.../test_decoding/expected/concurrent_ddl_dml.out  |   2 +-
src/test/isolation/README                          |  85 ++-
src/test/isolation/expected/alter-table-3.out      |  32 +-
src/test/isolation/expected/alter-table-4.out      |   2 +-
src/test/isolation/expected/deadlock-hard.out      |   2 +-
src/test/isolation/expected/deadlock-simple.out    |   2 +-
.../isolation/expected/eval-plan-qual-trigger.out  |   6 +-
src/test/isolation/expected/fk-deadlock2_1.out     |  12 +-
src/test/isolation/expected/fk-deadlock2_2.out     |  12 +-
src/test/isolation/expected/fk-deadlock_1.out      |  12 +-
.../expected/insert-conflict-do-nothing-2.out      |   8 +-
.../expected/lock-committed-keyupdate.out          |  24 +-
.../isolation/expected/lock-update-delete_1.out    |  12 +-
src/test/isolation/expected/multiple-cic.out       |   3 +-
src/test/isolation/expected/multiple-cic_1.out     |  20 -
.../isolation/expected/multixact-no-forget_1.out   |   4 +-
src/test/isolation/expected/nowait-4.out           |   2 +-
src/test/isolation/expected/nowait-4_1.out         |   2 +-
src/test/isolation/expected/nowait-5.out           |   2 +-
.../isolation/expected/propagate-lock-delete.out   |  16 +-
.../isolation/expected/read-write-unique-2.out     |   2 +-
.../isolation/expected/read-write-unique-3.out     |   2 +-
.../isolation/expected/read-write-unique-4.out     |   6 +-
src/test/isolation/expected/read-write-unique.out  |   2 +-
src/test/isolation/expected/sequence-ddl.out       |   2 +-
src/test/isolation/expected/skip-locked-4_1.out    |   2 +-
src/test/isolation/expected/timeouts.out           |  16 +-
src/test/isolation/expected/tuplelock-update.out   |  21 +-
src/test/isolation/isolationtester.c               | 782 +++++++++++++--------
src/test/isolation/isolationtester.h               |  47 +-
src/test/isolation/specparse.y                     |  87 ++-
src/test/isolation/specs/deadlock-hard.spec        |  12 +-
src/test/isolation/specs/deadlock-soft-2.spec      |  15 +-
src/test/isolation/specs/multiple-cic.spec         |   5 +-
src/test/isolation/specs/timeouts.spec             |  28 +-
src/test/isolation/specs/tuplelock-update.spec     |   9 +-
src/test/isolation/specscanner.l                   |  22 +-
37 files changed, 845 insertions(+), 475 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Use annotations to reduce instability of isolation-test results.
@ 2021-06-23 01:43  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2021-06-23 01:43 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Use annotations to reduce instability of isolation-test results.

We've long contended with isolation test results that aren't entirely
stable.  Some test scripts insert long delays to try to force stable
results, which is not terribly desirable; but other erratic failure
modes remain, causing unrepeatable buildfarm failures.  I've spent a
fair amount of time trying to solve this by improving the server-side
support code, without much success: that way is fundamentally unable
to cope with diffs that stem from chance ordering of arrival of
messages from different server processes.

We can improve matters on the client side, however, by annotating
the test scripts themselves to show the desired reporting order
of events that might occur in different orders.  This patch adds
three types of annotations to deal with (a) test steps that might or
might not complete their waits before the isolationtester can see them
waiting; (b) test steps in different sessions that can legitimately
complete in either order; and (c) NOTIFY messages that might arrive
before or after the completion of a step in another session.  We might
need more annotation types later, but this seems to be enough to deal
with the instabilities we've seen in the buildfarm.  It also lets us
get rid of all the long delays that were previously used, cutting more
than a minute off the runtime of the isolation tests.

Back-patch to all supported branches, because the buildfarm
instabilities affect all the branches, and because it seems desirable
to keep isolationtester's capabilities the same across all branches
to simplify possible future back-patching of tests.

Discussion: https://postgr.es/m/327948.1623725828@sss.pgh.pa.us

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/13f3fd9e436d27af50aaebf5a1f2440740ee93eb

Modified Files
--------------
.../test_decoding/expected/concurrent_ddl_dml.out  |   2 +-
src/test/isolation/README                          |  85 ++-
src/test/isolation/expected/alter-table-3.out      |  32 +-
src/test/isolation/expected/alter-table-4.out      |   2 +-
src/test/isolation/expected/deadlock-hard.out      |   2 +-
src/test/isolation/expected/deadlock-simple.out    |   2 +-
.../isolation/expected/eval-plan-qual-trigger.out  |   6 +-
src/test/isolation/expected/fk-deadlock2_1.out     |  12 +-
src/test/isolation/expected/fk-deadlock2_2.out     |  12 +-
src/test/isolation/expected/fk-deadlock_1.out      |  12 +-
.../expected/insert-conflict-do-nothing-2.out      |   8 +-
.../expected/lock-committed-keyupdate.out          |  24 +-
.../isolation/expected/lock-update-delete_1.out    |  12 +-
src/test/isolation/expected/multiple-cic.out       |   3 +-
src/test/isolation/expected/multiple-cic_1.out     |  20 -
.../isolation/expected/multixact-no-forget_1.out   |   4 +-
src/test/isolation/expected/nowait-4.out           |   2 +-
src/test/isolation/expected/nowait-4_1.out         |   2 +-
src/test/isolation/expected/nowait-5.out           |   2 +-
.../isolation/expected/propagate-lock-delete.out   |  16 +-
.../isolation/expected/read-write-unique-2.out     |   2 +-
.../isolation/expected/read-write-unique-3.out     |   2 +-
.../isolation/expected/read-write-unique-4.out     |   6 +-
src/test/isolation/expected/read-write-unique.out  |   2 +-
src/test/isolation/expected/skip-locked-4_1.out    |   2 +-
src/test/isolation/expected/timeouts.out           |  16 +-
src/test/isolation/expected/tuplelock-update.out   |  21 +-
src/test/isolation/isolationtester.c               | 784 +++++++++++++--------
src/test/isolation/isolationtester.h               |  47 +-
src/test/isolation/specparse.y                     | 121 +++-
src/test/isolation/specs/deadlock-hard.spec        |  12 +-
src/test/isolation/specs/deadlock-soft-2.spec      |  15 +-
src/test/isolation/specs/multiple-cic.spec         |   5 +-
src/test/isolation/specs/timeouts.spec             |  28 +-
src/test/isolation/specs/tuplelock-update.spec     |   9 +-
src/test/isolation/specscanner.l                   |  26 +-
36 files changed, 864 insertions(+), 494 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2021-06-23 01:43 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 01:43 pgsql: Use annotations to reduce instability of isolation-test results. Tom Lane <tgl@sss.pgh.pa.us>
2021-06-23 01:43 pgsql: Use annotations to reduce instability of isolation-test results. Tom Lane <tgl@sss.pgh.pa.us>
2021-06-23 01:43 pgsql: Use annotations to reduce instability of isolation-test results. Tom Lane <tgl@sss.pgh.pa.us>
2021-06-23 01:43 pgsql: Use annotations to reduce instability of isolation-test results. Tom Lane <tgl@sss.pgh.pa.us>
2021-06-23 01:43 pgsql: Use annotations to reduce instability of isolation-test results. Tom Lane <tgl@sss.pgh.pa.us>
2021-06-23 01:43 pgsql: Use annotations to reduce instability of isolation-test results. Tom Lane <tgl@sss.pgh.pa.us>

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