From 33a17b2de4bf79da57e29c546eb2a961cd41c764 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Wed, 18 Aug 2010 10:38:11 -0400 Subject: server and client should both update LRU table, BugzID 10755 --- apps/couch/src/couch_server.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/couch/src/couch_server.erl b/apps/couch/src/couch_server.erl index d1fc0e5b..267e69b0 100644 --- a/apps/couch/src/couch_server.erl +++ b/apps/couch/src/couch_server.erl @@ -242,6 +242,7 @@ handle_call({open_result, DbName, {ok, Db}}, _From, Server) -> [#db{compactor_pid=Froms}] = ets:lookup(couch_dbs, DbName), [gen_server:reply(From, {ok, Db}) || From <- Froms], true = ets:insert(couch_dbs, Db), + true = ets:insert(couch_lru, {DbName, now()}), {reply, ok, Server}; handle_call({open_result, DbName, Error}, _From, Server) -> % icky hack of field values - compactor_pid used to store clients @@ -331,7 +332,8 @@ handle_call({delete, DbName, _Options}, _From, Server) -> {reply, Error, Server} end; handle_call({db_updated, Db}, _From, Server) -> - ets:insert(couch_dbs, Db), + true = ets:insert(couch_dbs, Db), + true = ets:insert(couch_lru, {DbName, now()}), {reply, ok, Server}. -- cgit v1.2.3