pingcap/tidb

Add units to the numeric options in the configuration file

Open

#17.847 geöffnet am 8. Juni 2020

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Go (6.186 Forks)batch import
component/configfeature/acceptedhelp wantedtype/feature-requesttype/usability

Repository-Metriken

Stars
 (40.090 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 14T 4h) (346 gemergte PRs in 30 T)

Beschreibung

Feature Request

Is your feature request related to a problem? Please describe:

Most of the numeric configs lack unit. It is easy to confuse users. For example,

https://github.com/pingcap/tidb/blob/b05327509cb3584881815c2605a7537bbc24a8f0/config/config.toml.example#L243

104857600 should be 104857600B and 10737418240 should be 10737418240B or 10G.

Here is another example causing problems: #17434. https://github.com/pingcap/tidb/issues/17434#issuecomment-640209382

Describe the feature you'd like:

  • Add units to the numeric options in the configuration file.
  • Forbid numeric options without units.

Describe alternatives you've considered:

  • Explain the units in documents
  • Explain the units in the configuration file comments

Both of these solutions are not easy to use enough.

Teachability, Documentation, Adoption, Migration Strategy:

Change how the configuration file is parsed.

Contributor Guide