incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Kocoloski (JIRA)" <j...@apache.org>
Subject [jira] Created: (COUCHDB-168) allow user-configurable directory for view indexes
Date Tue, 02 Dec 2008 21:58:44 GMT
allow user-configurable directory for view indexes
--------------------------------------------------

                 Key: COUCHDB-168
                 URL: https://issues.apache.org/jira/browse/COUCHDB-168
             Project: CouchDB
          Issue Type: Wish
          Components: Database Core
            Reporter: Adam Kocoloski


Hi, I'd like to be able to store the DBs and the view indexes in separate locations.  This
patch creates a new config variable called "view_index_dir" that allows for that.  Best, Adam

diff --git a/trunk/etc/couchdb/default.ini.tpl.in b/trunk/etc/couchdb/default.ini.tpl.in
index f4eb49f..c9143cf 100644
--- a/trunk/etc/couchdb/default.ini.tpl.in
+++ b/trunk/etc/couchdb/default.ini.tpl.in
@@ -4,6 +4,7 @@

[couchdb]
database_dir = %localstatelibdir%
+view_index_dir = %localstatelibdir%
util_driver_dir = %couchprivlibdir%
max_document_size = 4294967296 ; 4 GB
view_timeout = 5000 ; 5 seconds
diff --git a/trunk/src/couchdb/couch_view.erl b/trunk/src/couchdb/couch_view.erl
index 4ebbb13..086e39f 100644
--- a/trunk/src/couchdb/couch_view.erl
+++ b/trunk/src/couchdb/couch_view.erl
@@ -238,10 +238,10 @@ fold(#view{btree=Btree}, StartKey, Dir, Fun, Acc) ->

init([]) ->
    % read configuration settings and register for configuration changes
-    RootDir = couch_config:get("couchdb", "database_dir"),
+    RootDir = couch_config:get("couchdb", "view_index_dir"),
    Self = self(),
    ok = couch_config:register(
-        fun("couchdb", "database_dir")->
+        fun("couchdb", "view_index_dir")->
            exit(Self, config_change)
        end),



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message