Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 38f8bdc

Browse files
committed
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.
1 parent c9882c6 commit 38f8bdc

File tree

2 files changed

+194
-145
lines changed

2 files changed

+194
-145
lines changed

src/test/isolation/README

+5-4
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,11 @@ Each step may contain commands that block until further action has been taken
107107
(most likely, some other session runs a step that unblocks it or causes a
108108
deadlock). A test that uses this ability must manually specify valid
109109
permutations, i.e. those that would not expect a blocked session to execute a
110-
command. If the test fails to follow that rule, the test is aborted.
111-
112-
Currently, at most one step can be waiting at a time. As long as one
113-
step is waiting, subsequent steps are run to completion synchronously.
110+
command. If a test fails to follow that rule, isolationtester will cancel it
111+
after 60 seconds. If the cancel doesn't work, isolationtester will exit
112+
uncleanly after a total of 75 seconds of wait time. Testing invalid
113+
permutations should be avoided because they can make the isolation tests take
114+
a very long time to run, and they serve no useful testing purpose.
114115

115116
Note that isolationtester recognizes that a command has blocked by looking
116117
to see if it is shown as waiting in the pg_locks view; therefore, only

0 commit comments

Comments
 (0)