Browse files

COUCHDB-1667: Revert index_dir to view_index_dir config option.

Patch by Alexander Shorin. (backport from couchdb 1.3.x branch)
  • Loading branch information...
1 parent 579f5f0 commit 7166e801e7cb327c82405cc0dd12676c002a7676 @benoitc benoitc committed Feb 9, 2013
View
3 apps/couch/test/etap/072-cleanup.t
@@ -125,7 +125,6 @@ view_cleanup() ->
count_index_files() ->
% call server to fetch the index files
RootDir = filename:absname(filename:join(test_util:rootdir(),
- couch_config:get("couchdb", "index_dir"))),
- io:format("root dir: ~p~n", [RootDir]),
+ couch_config:get("couchdb", "view_index_dir"))),
length(filelib:wildcard(RootDir ++ "/." ++
binary_to_list(?TEST_DB) ++ "_design"++"/mrview/*")).
View
9 apps/couch_index/src/couch_index_server.erl
@@ -75,13 +75,6 @@ init([]) ->
ets:new(?BY_DB, [protected, bag, named_table]),
couch_db_update_notifier:start_link(fun ?MODULE:update_notify/1),
RootDir = couch_index_util:root_dir(),
- % Deprecation warning if it wasn't index_dir
- case couch_config:get("couchdb", "index_dir") of
- undefined ->
- Msg = "Deprecation warning: 'view_index_dir' is now 'index_dir'",
- ?LOG_ERROR(Msg, []);
- _ -> ok
- end,
couch_file:init_delete_dir(RootDir),
{ok, #st{root_dir=RootDir}}.
@@ -183,8 +176,6 @@ rem_from_ets(DbName, Sig, DDocId, Pid) ->
config_change("couchdb", "view_index_dir") ->
- exit(whereis(?MODULE), config_change);
-config_change("couchdb", "index_dir") ->
exit(whereis(?MODULE), config_change).
View
8 apps/couch_index/src/couch_index_util.erl
@@ -19,12 +19,8 @@
root_dir() ->
- Default = couch:get_app_env(index_dir, couch_server:database_dir()),
- case couch_config:get("couchdb", "index_dir") of
- undefined -> couch_config:get("couchdb", "view_index_dir",
- Default);
- Value -> Value
- end.
+ Default = couch:get_app_env(view_index_dir, couch_server:database_dir()),
+ couch_config:get("couchdb", "view_index_dir", Default).
index_dir(Module, DbName) when is_binary(DbName) ->
DbDir = "." ++ binary_to_list(DbName) ++ "_design",

0 comments on commit 7166e80

Please sign in to comment.