Skip to content

Commit 39d8402

Browse files
committed
2 parents 6fa240f + a033f69 commit 39d8402

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

contrib/pg_xtm/tests/transfers.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,14 @@ func transfer(id int, cCommits chan int, cAborts chan int, wg *sync.WaitGroup) {
138138
continue
139139
}
140140

141-
src := conn[rand.Intn(2)]
142-
dst := conn[rand.Intn(2)]
141+
srci := rand.Intn(2)
142+
dsti := rand.Intn(2)
143+
if (srci > dsti) {
144+
continue
145+
}
146+
147+
src := conn[srci]
148+
dst := conn[dsti]
143149

144150
if src == dst {
145151
// local update

0 commit comments

Comments
 (0)