mirror of
https://github.com/typesense/typesense.git
synced 2025-05-19 05:08:43 +08:00
Accept config writes even under oom.
This commit is contained in:
parent
500fd851a6
commit
f2632a00e0
@ -248,8 +248,8 @@ void ReplicationState::write(const std::shared_ptr<http_req>& request, const std
|
||||
auto resource_check = cached_resource_stat_t::get_instance().has_enough_resources(raft_dir_path,
|
||||
config->get_disk_used_max_percentage(), config->get_memory_used_max_percentage());
|
||||
|
||||
if (resource_check != cached_resource_stat_t::OK &&
|
||||
request->http_method != "DELETE" && request->path_without_query != "/health") {
|
||||
if (resource_check != cached_resource_stat_t::OK && request->http_method != "DELETE" &&
|
||||
request->path_without_query != "/health" && request->path_without_query != "/config") {
|
||||
response->set_422("Rejecting write: running out of resource type: " +
|
||||
std::string(magic_enum::enum_name(resource_check)));
|
||||
response->final = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user