# Dict Generator

This tool is used to generate available configuration lists from TiDB components. For temporary modifications, please contact the Cloud Resilience Team oncaller to make changes directly on the ops portal.

## Usage

Prerequisites: Go, Docker, and Git must be installed locally.

Run the following commands:
```bash
./generate_all.sh && ./generate_ng.sh
```

## How

- For Golang components: use reflection to generate from config struct
- For TiKV: use `tikv --config-info json`
- For TiFlash: not supported

## Goal

Dump all necessary data from upstream code, no dependency on TiDB documentation on the ops portal.

Currently, the ops portal maintains the dict at the minor version level, so the default values may not be accurate. Maybe we could switch to patch version level dict.

## Status

### tidb/pd/lightning/ticdc
- Available config keys: generated from code struct
- Parameter type: generated from code struct
- Default value: not supported (ops portal uses value from TiDB documentation)
- Hot reloadable: not supported (ops portal uses value from TiDB documentation)

### tikv/tiflash_learner
- Available config keys: converted from `tikv --config-info json`
- Parameter type: inferred from default value
- Default value: converted from `tikv --config-info json`
- Hot reloadable: not supported (ops portal uses value from TiDB documentation)

### tiflash
Not supported

