diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-08-18 11:51:03 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-08-18 14:24:57 -0400 |
commit | 7393d62b7b630bee50f609d0ae8125d33f7cda2b (patch) | |
tree | 754e9ab17a586319c562de488e60056feff60bb8 /apps/couch/src/couch_view.erl | |
parent | c0cb2625f25a2b51485c164bea1d8822f449ce14 (diff) |
Grab bag of Cloudant patches to couch OTP application
- Removal of couch_db and couch_ref_counter processes. Active DBs are
accessible through a protected ets table owned by couch_server.
- #full_doc_info{} in by_id and by_seq trees for faster compaction at the
expense of more disk usage afterwards. Proposed as COUCHDB-738 but not
accepted upstream.
- Replication via distributed Erlang.
- Better hot upgrade support (uses exported functions much more often).
- Configurable btree chunk sizes allow for larger (but still bounded)
reductions.
- Shorter names for btree fields in #db{} and #db_header{}.
- couch_view_group does not keep a reference to the #db{}.
- Terms are stored compressed (again).
Diffstat (limited to 'apps/couch/src/couch_view.erl')
-rw-r--r-- | apps/couch/src/couch_view.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/couch/src/couch_view.erl b/apps/couch/src/couch_view.erl index 38c0a783..72facd27 100644 --- a/apps/couch/src/couch_view.erl +++ b/apps/couch/src/couch_view.erl @@ -17,7 +17,8 @@ detuple_kvs/2,init/1,terminate/2,handle_call/3,handle_cast/2,handle_info/2, code_change/3,get_reduce_view/4,get_temp_reduce_view/5,get_temp_map_view/4, get_map_view/4,get_row_count/1,reduce_to_count/1,fold_reduce/4, - extract_map_view/1,get_group_server/2,get_group_info/2,cleanup_index_files/1]). + extract_map_view/1,get_group_server/2,get_group_info/2, + cleanup_index_files/1,config_change/2]). -include("couch_db.hrl"). @@ -249,11 +250,7 @@ fold(#view{btree=Btree}, Fun, Acc, Options) -> init([]) -> % read configuration settings and register for configuration changes RootDir = couch_config:get("couchdb", "view_index_dir"), - Self = self(), - ok = couch_config:register( - fun("couchdb", "view_index_dir")-> - exit(Self, config_change) - end), + ok = couch_config:register(fun ?MODULE:config_change/2), couch_db_update_notifier:start_link( fun({deleted, DbName}) -> @@ -335,6 +332,9 @@ handle_info({'EXIT', FromPid, Reason}, Server) -> end, {noreply, Server}. +config_change("couchdb", "view_index_dir") -> + exit(whereis(couch_view), config_change). + add_to_ets(Pid, DbName, Sig) -> true = ets:insert(couch_groups_by_updater, {Pid, {DbName, Sig}}), true = ets:insert(group_servers_by_sig, {{DbName, Sig}, Pid}), |