Skip to content

Commit a6ff8ee

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

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
@@ -267,7 +267,7 @@ const (
267267
)
268268

269269
var (
270-
defaultEnableTelemetry = true
270+
defaultEnableTelemetry = false
271271
defaultRuntimeServices = []string{}
272272
defaultLocationLabels = []string{}
273273
// DefaultStoreLimit is the default store limit of add peer and remove peer.
@@ -408,10 +408,6 @@ func (c *Config) Parse(arguments []string) error {
408408
msg := fmt.Sprintf("disable-raft-learner in %s is deprecated", c.configFile)
409409
c.WarningMsgs = append(c.WarningMsgs, msg)
410410
}
411-
if meta.IsDefined("dashboard", "disable-telemetry") {
412-
msg := fmt.Sprintf("disable-telemetry in %s is deprecated, use enable-telemetry instead", c.configFile)
413-
c.WarningMsgs = append(c.WarningMsgs, msg)
414-
}
415411
}
416412

417413
// Parse again to replace with command line options.
@@ -1329,8 +1325,6 @@ type DashboardConfig struct {
13291325
InternalProxy bool `toml:"internal-proxy" json:"internal-proxy"`
13301326
EnableTelemetry bool `toml:"enable-telemetry" json:"enable-telemetry"`
13311327
EnableExperimental bool `toml:"enable-experimental" json:"enable-experimental"`
1332-
// WARN: DisableTelemetry is deprecated.
1333-
DisableTelemetry bool `toml:"disable-telemetry" json:"disable-telemetry,omitempty"`
13341328
}
13351329

13361330
// ToTiDBTLSConfig generates tls config for connecting to TiDB, used by tidb-dashboard.
@@ -1354,7 +1348,6 @@ func (c *DashboardConfig) adjust(meta *configMetaData) {
13541348
if !meta.IsDefined("enable-telemetry") {
13551349
c.EnableTelemetry = defaultEnableTelemetry
13561350
}
1357-
c.EnableTelemetry = c.EnableTelemetry && !c.DisableTelemetry
13581351
}
13591352

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

0 commit comments

Comments
 (0)