Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite0699fc

Browse files
committed
wrong bounds in pg_shard_transfers.go
1 parent46c3961 commite0699fc

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
fori:=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)

[8]ページ先頭

©2009-2025 Movatter.jp