Skip to content

Commit

Permalink
docs: use docs comment prefix and bump toml2docs version (#4711)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyy17 authored Sep 11, 2024
1 parent a3d567f commit aa03d3b
Show file tree
Hide file tree
Showing 8 changed files with 200 additions and 199 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ config-docs: ## Generate configuration documentation from toml files.
docker run --rm \
-v ${PWD}:/greptimedb \
-w /greptimedb/config \
toml2docs/toml2docs:v0.1.1 \
toml2docs/toml2docs:v0.1.3 \
-p '##' \
-t ./config-docs-template.md \
-o ./config.md
Expand Down
172 changes: 86 additions & 86 deletions config/config.md

Large diffs are not rendered by default.

84 changes: 45 additions & 39 deletions config/datanode.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
mode = "standalone"

## The datanode identifier and should be unique in the cluster.
## +toml2docs:none-default
## @toml2docs:none-default
node_id = 42

## Start services after regions have obtained leases.
Expand All @@ -20,23 +20,23 @@ enable_telemetry = true
init_regions_parallelism = 16

## Deprecated, use `grpc.addr` instead.
## +toml2docs:none-default
## @toml2docs:none-default
rpc_addr = "127.0.0.1:3001"

## Deprecated, use `grpc.hostname` instead.
## +toml2docs:none-default
## @toml2docs:none-default
rpc_hostname = "127.0.0.1"

## Deprecated, use `grpc.runtime_size` instead.
## +toml2docs:none-default
## @toml2docs:none-default
rpc_runtime_size = 8

## Deprecated, use `grpc.rpc_max_recv_message_size` instead.
## +toml2docs:none-default
## @toml2docs:none-default
rpc_max_recv_message_size = "512MB"

## Deprecated, use `grpc.rpc_max_send_message_size` instead.
## +toml2docs:none-default
## @toml2docs:none-default
rpc_max_send_message_size = "512MB"


Expand Down Expand Up @@ -71,23 +71,23 @@ max_send_message_size = "512MB"
mode = "disable"

## Certificate file path.
## +toml2docs:none-default
## @toml2docs:none-default
cert_path = ""

## Private key file path.
## +toml2docs:none-default
## @toml2docs:none-default
key_path = ""

## Watch for Certificate and key file change and auto reload.
## For now, gRPC tls config does not support auto reload.
watch = false

## The runtime options.
[runtime]
#+ [runtime]
## The number of threads to execute the runtime for global read operations.
global_rt_size = 8
#+ global_rt_size = 8
## The number of threads to execute the runtime for global write operations.
compact_rt_size = 4
#+ compact_rt_size = 4

## The heartbeat options.
[heartbeat]
Expand Down Expand Up @@ -135,7 +135,7 @@ provider = "raft_engine"

## The directory to store the WAL files.
## **It's only used when the provider is `raft_engine`**.
## +toml2docs:none-default
## @toml2docs:none-default
dir = "/tmp/greptimedb/wal"

## The size of the WAL segment file.
Expand Down Expand Up @@ -282,83 +282,83 @@ type = "File"

## Cache configuration for object storage such as 'S3' etc.
## The local file cache directory.
## +toml2docs:none-default
## @toml2docs:none-default
cache_path = "/path/local_cache"

## The local file cache capacity in bytes.
## +toml2docs:none-default
## @toml2docs:none-default
cache_capacity = "256MB"

## The S3 bucket name.
## **It's only used when the storage type is `S3`, `Oss` and `Gcs`**.
## +toml2docs:none-default
## @toml2docs:none-default
bucket = "greptimedb"

## The S3 data will be stored in the specified prefix, for example, `s3://${bucket}/${root}`.
## **It's only used when the storage type is `S3`, `Oss` and `Azblob`**.
## +toml2docs:none-default
## @toml2docs:none-default
root = "greptimedb"

## The access key id of the aws account.
## It's **highly recommended** to use AWS IAM roles instead of hardcoding the access key id and secret key.
## **It's only used when the storage type is `S3` and `Oss`**.
## +toml2docs:none-default
## @toml2docs:none-default
access_key_id = "test"

## The secret access key of the aws account.
## It's **highly recommended** to use AWS IAM roles instead of hardcoding the access key id and secret key.
## **It's only used when the storage type is `S3`**.
## +toml2docs:none-default
## @toml2docs:none-default
secret_access_key = "test"

## The secret access key of the aliyun account.
## **It's only used when the storage type is `Oss`**.
## +toml2docs:none-default
## @toml2docs:none-default
access_key_secret = "test"

## The account key of the azure account.
## **It's only used when the storage type is `Azblob`**.
## +toml2docs:none-default
## @toml2docs:none-default
account_name = "test"

## The account key of the azure account.
## **It's only used when the storage type is `Azblob`**.
## +toml2docs:none-default
## @toml2docs:none-default
account_key = "test"

## The scope of the google cloud storage.
## **It's only used when the storage type is `Gcs`**.
## +toml2docs:none-default
## @toml2docs:none-default
scope = "test"

## The credential path of the google cloud storage.
## **It's only used when the storage type is `Gcs`**.
## +toml2docs:none-default
## @toml2docs:none-default
credential_path = "test"

## The credential of the google cloud storage.
## **It's only used when the storage type is `Gcs`**.
## +toml2docs:none-default
## @toml2docs:none-default
credential = "base64-credential"

## The container of the azure account.
## **It's only used when the storage type is `Azblob`**.
## +toml2docs:none-default
## @toml2docs:none-default
container = "greptimedb"

## The sas token of the azure account.
## **It's only used when the storage type is `Azblob`**.
## +toml2docs:none-default
## @toml2docs:none-default
sas_token = ""

## The endpoint of the S3 service.
## **It's only used when the storage type is `S3`, `Oss`, `Gcs` and `Azblob`**.
## +toml2docs:none-default
## @toml2docs:none-default
endpoint = "https://s3.amazonaws.com"

## The region of the S3 service.
## **It's only used when the storage type is `S3`, `Oss`, `Gcs` and `Azblob`**.
## +toml2docs:none-default
## @toml2docs:none-default
region = "us-west-2"

# Custom storage options
Expand Down Expand Up @@ -388,7 +388,7 @@ region = "us-west-2"
[region_engine.mito]

## Number of region workers.
num_workers = 8
#+ num_workers = 8

## Request channel size of each worker.
worker_channel_size = 128
Expand All @@ -409,26 +409,32 @@ max_background_jobs = 4
auto_flush_interval = "1h"

## Global write buffer size for all regions. If not set, it's default to 1/8 of OS memory with a max limitation of 1GB.
global_write_buffer_size = "1GB"
## @toml2docs:none-default="Auto"
#+ global_write_buffer_size = "1GB"

## Global write buffer size threshold to reject write requests. If not set, it's default to 2 times of `global_write_buffer_size`
global_write_buffer_reject_size = "2GB"
## @toml2docs:none-default="Auto"
#+ global_write_buffer_reject_size = "2GB"

## Cache size for SST metadata. Setting it to 0 to disable the cache.
## If not set, it's default to 1/32 of OS memory with a max limitation of 128MB.
sst_meta_cache_size = "128MB"
## @toml2docs:none-default="Auto"
#+ sst_meta_cache_size = "128MB"

## Cache size for vectors and arrow arrays. Setting it to 0 to disable the cache.
## If not set, it's default to 1/16 of OS memory with a max limitation of 512MB.
vector_cache_size = "512MB"
## @toml2docs:none-default="Auto"
#+ vector_cache_size = "512MB"

## Cache size for pages of SST row groups. Setting it to 0 to disable the cache.
## If not set, it's default to 1/8 of OS memory.
page_cache_size = "512MB"
## @toml2docs:none-default="Auto"
#+ page_cache_size = "512MB"

## Cache size for time series selector (e.g. `last_value()`). Setting it to 0 to disable the cache.
## If not set, it's default to 1/16 of OS memory with a max limitation of 512MB.
selector_result_cache_size = "512MB"
## @toml2docs:none-default="Auto"
#+ selector_result_cache_size = "512MB"

## Whether to enable the experimental write cache.
enable_experimental_write_cache = false
Expand All @@ -440,7 +446,7 @@ experimental_write_cache_path = ""
experimental_write_cache_size = "512MB"

## TTL for write cache.
## +toml2docs:none-default
## @toml2docs:none-default
experimental_write_cache_ttl = "8h"

## Buffer size for SST writing.
Expand Down Expand Up @@ -556,7 +562,7 @@ fork_dictionary_bytes = "1GiB"
dir = "/tmp/greptimedb/logs"

## The log level. Can be `info`/`debug`/`warn`/`error`.
## +toml2docs:none-default
## @toml2docs:none-default
level = "info"

## Enable OTLP tracing.
Expand Down Expand Up @@ -590,7 +596,7 @@ write_interval = "30s"
## For `standalone` mode, `self_import` is recommend to collect metrics generated by itself
## You must create the database before enabling it.
[export_metrics.self_import]
## +toml2docs:none-default
## @toml2docs:none-default
db = "greptime_metrics"

[export_metrics.remote_write]
Expand All @@ -603,5 +609,5 @@ headers = { }
## The tracing options. Only effect when compiled with `tokio-console` feature.
[tracing]
## The tokio console address.
## +toml2docs:none-default
## @toml2docs:none-default
tokio_console_addr = "127.0.0.1"
6 changes: 3 additions & 3 deletions config/flownode.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
mode = "distributed"

## The flownode identifier and should be unique in the cluster.
## +toml2docs:none-default
## @toml2docs:none-default
node_id = 14

## The gRPC server options.
Expand Down Expand Up @@ -63,7 +63,7 @@ retry_interval = "3s"
dir = "/tmp/greptimedb/logs"

## The log level. Can be `info`/`debug`/`warn`/`error`.
## +toml2docs:none-default
## @toml2docs:none-default
level = "info"

## Enable OTLP tracing.
Expand All @@ -87,6 +87,6 @@ default_ratio = 1.0
## The tracing options. Only effect when compiled with `tokio-console` feature.
[tracing]
## The tokio console address.
## +toml2docs:none-default
## @toml2docs:none-default
tokio_console_addr = "127.0.0.1"

26 changes: 13 additions & 13 deletions config/frontend.example.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## The default timezone of the server.
## +toml2docs:none-default
## @toml2docs:none-default
default_timezone = "UTC"

## The runtime options.
[runtime]
#+ [runtime]
## The number of threads to execute the runtime for global read operations.
global_rt_size = 8
#+ global_rt_size = 8
## The number of threads to execute the runtime for global write operations.
compact_rt_size = 4
#+ compact_rt_size = 4

## The heartbeat options.
[heartbeat]
Expand Down Expand Up @@ -44,11 +44,11 @@ runtime_size = 8
mode = "disable"

## Certificate file path.
## +toml2docs:none-default
## @toml2docs:none-default
cert_path = ""

## Private key file path.
## +toml2docs:none-default
## @toml2docs:none-default
key_path = ""

## Watch for Certificate and key file change and auto reload.
Expand Down Expand Up @@ -76,11 +76,11 @@ runtime_size = 2
mode = "disable"

## Certificate file path.
## +toml2docs:none-default
## @toml2docs:none-default
cert_path = ""

## Private key file path.
## +toml2docs:none-default
## @toml2docs:none-default
key_path = ""

## Watch for Certificate and key file change and auto reload
Expand All @@ -101,11 +101,11 @@ runtime_size = 2
mode = "disable"

## Certificate file path.
## +toml2docs:none-default
## @toml2docs:none-default
cert_path = ""

## Private key file path.
## +toml2docs:none-default
## @toml2docs:none-default
key_path = ""

## Watch for Certificate and key file change and auto reload
Expand Down Expand Up @@ -170,7 +170,7 @@ tcp_nodelay = true
dir = "/tmp/greptimedb/logs"

## The log level. Can be `info`/`debug`/`warn`/`error`.
## +toml2docs:none-default
## @toml2docs:none-default
level = "info"

## Enable OTLP tracing.
Expand Down Expand Up @@ -204,7 +204,7 @@ write_interval = "30s"
## For `standalone` mode, `self_import` is recommend to collect metrics generated by itself
## You must create the database before enabling it.
[export_metrics.self_import]
## +toml2docs:none-default
## @toml2docs:none-default
db = "greptime_metrics"

[export_metrics.remote_write]
Expand All @@ -217,5 +217,5 @@ headers = { }
## The tracing options. Only effect when compiled with `tokio-console` feature.
[tracing]
## The tokio console address.
## +toml2docs:none-default
## @toml2docs:none-default
tokio_console_addr = "127.0.0.1"
Loading

0 comments on commit aa03d3b

Please sign in to comment.