You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/08/22 06:31:39 UTC

couch commit: updated refs/heads/windsor-merge to 609396e

Repository: couchdb-couch
Updated Branches:
  refs/heads/windsor-merge 32e9b352b -> 609396e60


Detect clustered dbs based on a missing id_btree

This function is called up in the HTTP coordinator so the usual trick of
detecting shard files based on the `shards/` prefix doesn't work.
Instead we can rely on the fact that the id_btree field is undefined.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/609396e6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/609396e6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/609396e6

Branch: refs/heads/windsor-merge
Commit: 609396e605a05c6a9296091acaf028729288887e
Parents: 32e9b35
Author: Paul J. Davis <pa...@gmail.com>
Authored: Thu Aug 21 23:30:53 2014 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Thu Aug 21 23:30:53 2014 -0500

----------------------------------------------------------------------
 src/couch_changes.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/609396e6/src/couch_changes.erl
----------------------------------------------------------------------
diff --git a/src/couch_changes.erl b/src/couch_changes.erl
index 637a6ba..b5e8f89 100644
--- a/src/couch_changes.erl
+++ b/src/couch_changes.erl
@@ -225,9 +225,9 @@ check_docids(_) ->
     throw({bad_request, Msg}).
 
 
-open_ddoc(#db{name= <<"shards/", _/binary>> =ShardName}, DDocId) ->
+open_ddoc(#db{name=DbName, id_tree=undefined}, DDocId) ->
     {_, Ref} = spawn_monitor(fun() ->
-        exit(fabric:open_doc(mem3:dbname(ShardName), DDocId, []))
+        exit(fabric:open_doc(mem3:dbname(DbName), DDocId, [ejson_body]))
     end),
     receive
         {'DOWN', Ref, _, _, {ok, _}=Response} ->