File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ go_library(
9
9
importpath = "github.com/cockroachdb/cockroach/pkg/sql/stmtdiagnostics" ,
10
10
visibility = ["//visibility:public" ],
11
11
deps = [
12
+ "//pkg/clusterversion" ,
12
13
"//pkg/multitenant" ,
13
14
"//pkg/settings" ,
14
15
"//pkg/settings/cluster" ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import (
12
12
"strings"
13
13
"time"
14
14
15
+ "github.com/cockroachdb/cockroach/pkg/clusterversion"
15
16
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
16
17
"github.com/cockroachdb/cockroach/pkg/sql/appstatspb"
17
18
"github.com/cockroachdb/cockroach/pkg/sql/isql"
@@ -541,6 +542,10 @@ func (r *TxnRegistry) findTxnRequestLocked(requestID RequestID) bool {
541
542
// pollTxnRequests reads the pending rows from system.transaction_diagnostics_requests and
542
543
// updates r.mu.requests accordingly.
543
544
func (r * TxnRegistry ) pollTxnRequests (ctx context.Context ) error {
545
+ if ! r .st .Version .IsActive (ctx , clusterversion .V25_4 ) {
546
+ return nil
547
+ }
548
+
544
549
var rows []tree.Datums
545
550
546
551
// Loop until we run the query without straddling an epoch increment.
You can’t perform that action at this time.
0 commit comments