summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2010-08-18 10:38:11 -0400
committerAdam Kocoloski <adam@cloudant.com>2010-08-27 16:28:47 -0400
commit33a17b2de4bf79da57e29c546eb2a961cd41c764 (patch)
tree8a226d0e9c01a85893bbe375fa55fb33d1de6435 /apps
parentf5ff2961d589623d1dd96faba82b9f86b620cdd0 (diff)
server and client should both update LRU table, BugzID 10755
Diffstat (limited to 'apps')
-rw-r--r--apps/couch/src/couch_server.erl4
1 files changed, 3 insertions, 1 deletions
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}.