# RocksDB Database Configuration Fragment
# Used by: control-center, installer (when backend = rocksdb)

[[elements]]
border_top = true
border_bottom = false
name = "database_section_header"
title = "💾 RocksDB Database Configuration"
type = "section_header"

[[elements]]
default = "rocksdb"
help = "Database backend type"
name = "database_backend"
nickel_path = ["database", "backend"]
prompt = "Database Backend"
type = "text"

[[elements]]
default = "/var/lib/provisioning/data"
help = "Path to RocksDB data directory"
name = "database_path"
nickel_path = ["database", "path"]
prompt = "Database Path"
required = true
type = "text"

[[elements]]
default = 10
help = "Database connection pool size (range: 1-100)"
max = 100
min = 1
name = "database_pool_size"
nickel_path = ["database", "pool_size"]
prompt = "Connection Pool Size"
type = "number"

[[elements]]
default = 30
help = "Database operation timeout in seconds (range: 10-3600)"
max = 3600
min = 10
name = "database_timeout"
nickel_path = ["database", "timeout"]
prompt = "Timeout (seconds)"
type = "number"

[[elements]]
default = 3
help = "Number of retry attempts for failed operations (range: 0-10)"
max = 10
min = 0
name = "database_retry_attempts"
nickel_path = ["database", "retry_attempts"]
prompt = "Retry Attempts"
type = "number"

[[elements]]
default = 100
help = "Delay in milliseconds between retry attempts (range: 1000-60000)"
max = 60000
min = 1000
name = "database_retry_delay"
nickel_path = ["database", "retry_delay"]
prompt = "Retry Delay (ms)"
type = "number"
