diff --git a/.github/workflows/unit_race.yml b/.github/workflows/unit_race.yml index 9c779d11986..734cec15ebf 100644 --- a/.github/workflows/unit_race.yml +++ b/.github/workflows/unit_race.yml @@ -90,7 +90,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' uses: nick-fields/retry@v2 with: - timeout_minutes: 30 + timeout_minutes: 45 max_attempts: 3 retry_on: error command: | diff --git a/go/mysql/fakesqldb/server.go b/go/mysql/fakesqldb/server.go index 18ccff193cc..03b43c29742 100644 --- a/go/mysql/fakesqldb/server.go +++ b/go/mysql/fakesqldb/server.go @@ -613,11 +613,15 @@ func (db *DB) GetQueryCalledNum(query string) int { // QueryLog returns the query log in a semicomma separated string func (db *DB) QueryLog() string { + db.mu.Lock() + defer db.mu.Unlock() return strings.Join(db.querylog, ";") } // ResetQueryLog resets the query log func (db *DB) ResetQueryLog() { + db.mu.Lock() + defer db.mu.Unlock() db.querylog = nil } diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go index c635479171c..4c1bdcce199 100644 --- a/go/vt/vtctl/grpcvtctldserver/server.go +++ b/go/vt/vtctl/grpcvtctldserver/server.go @@ -4168,7 +4168,9 @@ func (s *VtctldServer) ValidateVersionShard(ctx context.Context, req *vtctldatap } wg.Add(1) - go s.diffVersion(ctx, primaryVersion.Version, shard.PrimaryAlias, alias, &wg, &er) + go func(alias *topodatapb.TabletAlias) { + s.diffVersion(ctx, primaryVersion.Version, shard.PrimaryAlias, alias, &wg, &er) + }(alias) } wg.Wait() diff --git a/go/vt/vtctl/grpcvtctldserver/server_test.go b/go/vt/vtctl/grpcvtctldserver/server_test.go index 636019daee1..7bab7742b25 100644 --- a/go/vt/vtctl/grpcvtctldserver/server_test.go +++ b/go/vt/vtctl/grpcvtctldserver/server_test.go @@ -2705,7 +2705,7 @@ func TestDeleteShards(t *testing.T) { defer func() { topofactory.SetError(nil) - actualShards := []*vtctldatapb.Shard{} + var actualShards []*vtctldatapb.Shard keyspaces, err := ts.GetKeyspaces(ctx) require.NoError(t, err, "cannot get keyspace names to check remaining shards")