Skip to content

Commit

Permalink
roachtest: fix query to check for currently running jobs
Browse files Browse the repository at this point in the history
It was missing the `coordinator_id` for the node being waited on.

Epic: none

Release note: None
  • Loading branch information
renatolabs committed Jun 14, 2023
1 parent 584fe30 commit 1b273c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/cmd/roachtest/tests/mixed_version_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,10 @@ func (mvb *mixedVersionBackup) disableJobAdoption(
if err := retry.ForDuration(testutils.DefaultSucceedsSoonDuration, func() error {
db := h.Connect(node)
var count int
err := db.QueryRow(`SELECT count(*) FROM [SHOW JOBS] WHERE status = 'running'`).Scan(&count)
err := db.QueryRow(fmt.Sprintf(
`SELECT count(*) FROM [SHOW JOBS] WHERE status = 'running' AND coordinator_id = %d`,
node,
)).Scan(&count)
if err != nil {
l.Printf("node %d: error querying running jobs (%s)", node, err)
return err
Expand Down

0 comments on commit 1b273c6

Please sign in to comment.