libsql / sqld

LibSQL with extended capabilities like HTTP protocol, replication, and more.
https://libsql.org
903 stars 38 forks source link

Limit maximum DB size #736

Closed MarinPostma closed 1 year ago

MarinPostma commented 1 year ago

This PR adds the ability to limit the maximum db size. This is done on a per-namespace basis, by sending a request to the /v1/namespaces/foo/config on the admin API. e.g:

{
    "block_reads": false,
    "block_writes": false,
    "block_reason": null,
    "max_db_size": "10gb",
}

it is also possible to set the maximum db size on namespace creation