Skip to content

Commit

Permalink
Merge pull request #124 from taosdata/fix/database-option-default-3.1
Browse files Browse the repository at this point in the history
add database option default cfg
  • Loading branch information
sheyanjie-qq authored Jul 2, 2024
2 parents 0b78ede + 026789a commit 6436309
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions infrastructure/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,22 @@ func init() {
_ = viper.BindEnv("metrics.database.name", "TAOS_KEEPER_METRICS_DATABASE")
pflag.String("metrics.database.name", "log", `database for storing metrics data. Env "TAOS_KEEPER_METRICS_DATABASE"`)

viper.SetDefault("metrics.database.options.vgroups", 1)
_ = viper.BindEnv("metrics.database.options.vgroups", "TAOS_KEEPER_METRICS_VGROUPS")
pflag.Int("metrics.database.options.vgroups", 1, `database option vgroups for audit database. Env "TAOS_KEEPER_METRICS_VGROUPS"`)

viper.SetDefault("metrics.database.options.buffer", 64)
_ = viper.BindEnv("metrics.database.options.buffer", "TAOS_KEEPER_METRICS_BUFFER")
pflag.Int("metrics.database.options.buffer", 64, `database option buffer for audit database. Env "TAOS_KEEPER_METRICS_BUFFER"`)

viper.SetDefault("metrics.database.options.keep", 90)
_ = viper.BindEnv("metrics.database.options.keep", "TAOS_KEEPER_METRICS_KEEP")
pflag.Int("metrics.database.options.keep", 90, `database option buffer for audit database. Env "TAOS_KEEPER_METRICS_KEEP"`)

viper.SetDefault("metrics.database.options.cachemodel", "both")
_ = viper.BindEnv("metrics.database.options.cachemodel", "TAOS_KEEPER_METRICS_CACHEMODEL")
pflag.String("metrics.database.options.cachemodel", "both", `database option cachemodel for audit database. Env "TAOS_KEEPER_METRICS_CACHEMODEL"`)

viper.SetDefault("metrics.tables", []string{})
_ = viper.BindEnv("metrics.tables", "TAOS_KEEPER_METRICS_TABLES")
pflag.StringArray("metrics.tables", []string{}, `export some tables that are not super table, multiple values split with white space. Env "TAOS_KEEPER_METRICS_TABLES"`)
Expand Down

0 comments on commit 6436309

Please sign in to comment.