telemetry: Initialize telemetry asynchronously (#35898)
close pingcap/tidb#35897
This commit is contained in:
@ -2879,8 +2879,10 @@ 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.
|
||||
dom.TelemetryReportLoop(ses[5])
|
||||
dom.TelemetryRotateSubWindowLoop(ses[5])
|
||||
go func() {
|
||||
dom.TelemetryReportLoop(ses[5])
|
||||
dom.TelemetryRotateSubWindowLoop(ses[5])
|
||||
}()
|
||||
}
|
||||
|
||||
// A sub context for update table stats, and other contexts for concurrent stats loading.
|
||||
|
||||
Reference in New Issue
Block a user