You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2024/08/03 20:27:59 UTC
(couchdb) 01/01: Removed unused close_lru gen_server call
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch unused-close-lru-call
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit be9c2b6d44a1c309b93231d8cef501a9943f9066
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Sat Aug 3 16:25:45 2024 -0400
Removed unused close_lru gen_server call
We close the lru via make_room/2 only. Nothing seems to call gen_server call, so
let's not keep it around as it's confusing when inspecting the already tricky
lru cache logic.
---
src/couch/src/couch_server.erl | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/couch/src/couch_server.erl b/src/couch/src/couch_server.erl
index 379724953..8f36f1c7f 100644
--- a/src/couch/src/couch_server.erl
+++ b/src/couch/src/couch_server.erl
@@ -520,13 +520,6 @@ open_async_int(Server, DbName, Options) ->
Error1
end.
-handle_call(close_lru, _From, #server{lru = Lru} = Server) ->
- case couch_lru:close(Lru) of
- {true, NewLru} ->
- {reply, ok, db_closed(Server#server{lru = NewLru}, [])};
- false ->
- {reply, {error, all_dbs_active}, Server}
- end;
handle_call(open_dbs_count, _From, Server) ->
{reply, Server#server.dbs_open, Server};
handle_call({set_update_lru_on_read, UpdateOnRead}, _From, Server) ->