Skip to content

Commit e0699fc

Browse files
committed
wrong bounds in pg_shard_transfers.go
1 parent 46c3961 commit e0699fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/pg_dtm/tests/pg_shard_transfers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ func transfer(id int, wg *sync.WaitGroup) {
5959

6060
for i:=0; i < N_ITERATIONS; i++ {
6161
amount := 1
62-
account1 := rand.Intn(N_ACCOUNTS)
63-
account2 := rand.Intn(N_ACCOUNTS)
62+
account1 := rand.Intn(N_ACCOUNTS-1)+1
63+
account2 := rand.Intn(N_ACCOUNTS-1)+1
6464
exec(conn, "begin")
6565
exec(conn, fmt.Sprintf("update t set v = v - %d where u=%d", amount, account1))
6666
exec(conn, fmt.Sprintf("update t set v = v + %d where u=%d", amount, account2))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy