diff options
author | Russell Branca <chewbranca@gmail.com> | 2018-09-12 11:12:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 11:12:14 -0700 |
commit | d56c7281cb9a287835dc278266c304411764aa32 (patch) | |
tree | 8f23cf51f1a6bbdaa262f57b860747226455d088 | |
parent | ee3c4b5d2e58e35a11e6995d47580554a7d7aca8 (diff) | |
parent | 79dd05481c7c6f7d7a9eff483a6f8f839cc147ac (diff) | |
download | couchdb-d56c7281cb9a287835dc278266c304411764aa32.tar.gz |
Merge pull request #1593 from apache/couch-server-improvements
Couch server improvements
-rw-r--r-- | src/couch/src/couch_server.erl | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/couch/src/couch_server.erl b/src/couch/src/couch_server.erl index 50c8caee5..c4b7bf199 100644 --- a/src/couch/src/couch_server.erl +++ b/src/couch/src/couch_server.erl @@ -101,9 +101,14 @@ open(DbName, Options0) -> end. update_lru(DbName, Options) -> - case lists:member(sys_db, Options) of - false -> gen_server:cast(couch_server, {update_lru, DbName}); - true -> ok + case config:get_boolean("couchdb", "update_lru_on_read", false) of + true -> + case lists:member(sys_db, Options) of + false -> gen_server:cast(couch_server, {update_lru, DbName}); + true -> ok + end; + false -> + ok end. close_lru() -> @@ -230,7 +235,13 @@ init([]) -> ok = config:listen_for_changes(?MODULE, nil), ok = couch_file:init_delete_dir(RootDir), hash_admin_passwords(), - ets:new(couch_dbs, [set, protected, named_table, {keypos, #entry.name}]), + ets:new(couch_dbs, [ + set, + protected, + named_table, + {keypos, #entry.name}, + {read_concurrency, true} + ]), ets:new(couch_dbs_pid_to_name, [set, protected, named_table]), process_flag(trap_exit, true), {ok, #server{root_dir=RootDir, |