GreptimeTeam/greptimedb

Support configuring region engine options through environment variables

Open

#8,620 opened on Jul 23, 2026

 (1 comment) (0 reactions) (1 assignee)Rust (518 forks)github user discovery
C-buggood first issue

Repository metrics

Stars
 (6,519 stars)
PR merge metrics
 (PR metrics pending)

Description

What type of enhancement is this?

Configuration

What does the enhancement do?

Allow region engine options to be configured through environment variables, consistently with other layered configuration fields.

For example, the following standalone configuration should be expressible through an environment variable:

[[region_engine]]

[region_engine.mito]
global_write_buffer_reject_size = "4GB"

A natural environment variable following the documented double-underscore mapping is:

export GREPTIMEDB_STANDALONE__REGION_ENGINE__MITO__GLOBAL_WRITE_BUFFER_REJECT_SIZE="4GB"
greptime standalone start

Currently startup fails with:

Error: 0: Failed to load layered config, at src/cmd/src/standalone.rs:251:10
1: Failed to load layered config, at src/common/config/src/config.rs:79:14
2: invalid type: map, expected a sequence

region_engine is a Vec<RegionEngineConfig>, while the environment source constructs region_engine.mito as a map. Consequently, nested region engine settings cannot currently be overridden through environment variables.

Expected behavior: provide a supported environment-variable representation for region engine options, or otherwise provide a dedicated mapping that allows overriding options such as global_write_buffer_reject_size without requiring a TOML file.

Implementation challenges

The layered configuration merge should preserve the default region engine entries and override only the selected engine's nested option. Treating numeric environment path components as sequence indices may be one option, but it must avoid replacing or dropping other configured/default engines. The chosen syntax should also be documented in the example configuration or configuration guide.

Contributor guide