From 1b273c6656446a20bad915dd6a14c2d4dd309d3a Mon Sep 17 00:00:00 2001 From: Renato Costa Date: Tue, 13 Jun 2023 16:22:26 -0400 Subject: [PATCH] roachtest: fix query to check for currently running jobs It was missing the `coordinator_id` for the node being waited on. Epic: none Release note: None --- pkg/cmd/roachtest/tests/mixed_version_backup.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/roachtest/tests/mixed_version_backup.go b/pkg/cmd/roachtest/tests/mixed_version_backup.go index 888412fcdc4f..97e7ff2bb97b 100644 --- a/pkg/cmd/roachtest/tests/mixed_version_backup.go +++ b/pkg/cmd/roachtest/tests/mixed_version_backup.go @@ -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