Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#40156
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
sunxiaoguang authored and ti-chi-bot committed Feb 7, 2023
1 parent ac6560f commit d9b0e3f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -2928,8 +2928,19 @@ func BootstrapSession(store kv.Storage) (*domain.Domain, error) {
if dom.GetEtcdClient() != nil {
// We only want telemetry data in production-like clusters. When TiDB is deployed over other engines,
// for example, unistore engine (used for local tests), we just skip it. Its etcd client is nil.
<<<<<<< HEAD
dom.TelemetryReportLoop(ses[5])
dom.TelemetryRotateSubWindowLoop(ses[5])
=======
if config.GetGlobalConfig().EnableTelemetry {
// There is no way to turn telemetry on with global variable `tidb_enable_telemetry`
// when it is disabled in config. See IsTelemetryEnabled function in telemetry/telemetry.go
go func() {
dom.TelemetryReportLoop(ses[5])
dom.TelemetryRotateSubWindowLoop(ses[5])
}()
}
>>>>>>> 869b21dcf80 (session: Do not run telemetry loops when it's disabled in config (#40156))
}

// A sub context for update table stats, and other contexts for concurrent stats loading.
Expand Down

0 comments on commit d9b0e3f

Please sign in to comment.