Commit 38f8bdca authored by Robert Haas's avatar Robert Haas

Modify the isolation tester so that multiple sessions can wait.

This allows testing of deadlock scenarios.  Scenarios that would
previously have been considered invalid are now simply taken as a
scenario in which more than one backend will wait.
parent c9882c60
...@@ -107,10 +107,11 @@ Each step may contain commands that block until further action has been taken ...@@ -107,10 +107,11 @@ Each step may contain commands that block until further action has been taken
(most likely, some other session runs a step that unblocks it or causes a (most likely, some other session runs a step that unblocks it or causes a
deadlock). A test that uses this ability must manually specify valid deadlock). A test that uses this ability must manually specify valid
permutations, i.e. those that would not expect a blocked session to execute a permutations, i.e. those that would not expect a blocked session to execute a
command. If the test fails to follow that rule, the test is aborted. command. If a test fails to follow that rule, isolationtester will cancel it
after 60 seconds. If the cancel doesn't work, isolationtester will exit
Currently, at most one step can be waiting at a time. As long as one uncleanly after a total of 75 seconds of wait time. Testing invalid
step is waiting, subsequent steps are run to completion synchronously. permutations should be avoided because they can make the isolation tests take
a very long time to run, and they serve no useful testing purpose.
Note that isolationtester recognizes that a command has blocked by looking Note that isolationtester recognizes that a command has blocked by looking
to see if it is shown as waiting in the pg_locks view; therefore, only to see if it is shown as waiting in the pg_locks view; therefore, only
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment