Skip to content

Commit 9d0ff20

Browse files
nolouchti-chi-bot
authored andcommitted
This is an automated cherry-pick of #5974
close #5973 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
1 parent b04f0a9 commit 9d0ff20

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

conf/config.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,15 @@
199199
# internal-proxy = false
200200

201201
## When enabled, usage data will be sent to PingCAP for improving user experience.
202+
<<<<<<< HEAD
202203
# enable-telemetry = true
204+
=======
205+
# enable-telemetry = false
206+
207+
[keyspaces]
208+
## pre-alloc is used to pre-allocate keyspaces during pd bootstrap.
209+
## Its value should be a list of strings, denotting the name of the keyspaces.
210+
## Example:
211+
## pre-alloc = ["admin", "user1", "user2"]
212+
# pre-alloc = []
213+
>>>>>>> 1bc8e2a5b (dashboard: default close telemetry (#5974))

server/config/config.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ const (
270270
)
271271

272272
var (
273-
defaultEnableTelemetry = true
273+
defaultEnableTelemetry = false
274274
defaultRuntimeServices = []string{}
275275
defaultLocationLabels = []string{}
276276
// DefaultStoreLimit is the default store limit of add peer and remove peer.
@@ -411,10 +411,6 @@ func (c *Config) Parse(arguments []string) error {
411411
msg := fmt.Sprintf("disable-raft-learner in %s is deprecated", c.configFile)
412412
c.WarningMsgs = append(c.WarningMsgs, msg)
413413
}
414-
if meta.IsDefined("dashboard", "disable-telemetry") {
415-
msg := fmt.Sprintf("disable-telemetry in %s is deprecated, use enable-telemetry instead", c.configFile)
416-
c.WarningMsgs = append(c.WarningMsgs, msg)
417-
}
418414
}
419415

420416
// Parse again to replace with command line options.
@@ -1368,8 +1364,6 @@ type DashboardConfig struct {
13681364
InternalProxy bool `toml:"internal-proxy" json:"internal-proxy"`
13691365
EnableTelemetry bool `toml:"enable-telemetry" json:"enable-telemetry"`
13701366
EnableExperimental bool `toml:"enable-experimental" json:"enable-experimental"`
1371-
// WARN: DisableTelemetry is deprecated.
1372-
DisableTelemetry bool `toml:"disable-telemetry" json:"disable-telemetry,omitempty"`
13731367
}
13741368

13751369
// ToTiDBTLSConfig generates tls config for connecting to TiDB, used by tidb-dashboard.
@@ -1393,7 +1387,6 @@ func (c *DashboardConfig) adjust(meta *configMetaData) {
13931387
if !meta.IsDefined("enable-telemetry") {
13941388
c.EnableTelemetry = defaultEnableTelemetry
13951389
}
1396-
c.EnableTelemetry = c.EnableTelemetry && !c.DisableTelemetry
13971390
}
13981391

13991392
// ReplicationModeConfig is the configuration for the replication policy.

0 commit comments

Comments
 (0)