Skip to content

Commit

Permalink
feat: enable updating max_row_size in namespace config
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenDelahoy committed Dec 23, 2024
1 parent 58b016a commit ebd2af6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libsql-server/src/http/admin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ async fn handle_get_config<C: Connector>(
block_writes: config.block_writes,
block_reason: config.block_reason.clone(),
max_db_size: Some(max_db_size),
max_row_size: Some(config.max_row_size),
heartbeat_url: config.heartbeat_url.clone().map(|u| u.into()),
jwt_key: config.jwt_key.clone(),
allow_attach: config.allow_attach,
Expand Down Expand Up @@ -302,6 +303,8 @@ struct HttpDatabaseConfig {
#[serde(default)]
max_db_size: Option<bytesize::ByteSize>,
#[serde(default)]
max_row_size: Option<u64>,
#[serde(default)]
heartbeat_url: Option<String>,
#[serde(default)]
jwt_key: Option<String>,
Expand Down Expand Up @@ -333,6 +336,7 @@ async fn handle_post_config<C>(
updated.block_reason = req.block_reason;
updated.allow_attach = req.allow_attach;
updated.txn_timeout = req.txn_timeout_s.map(Duration::from_secs);
updated.max_row_size = req.max_row_size.unwrap_or(updated.max_row_size);
if let Some(size) = req.max_db_size {
updated.max_db_pages = size.as_u64() / LIBSQL_PAGE_SIZE;
}
Expand Down

0 comments on commit ebd2af6

Please sign in to comment.