Repository: couchdb-couch-index
Updated Branches:
refs/heads/master 7acb7d370 -> eb616267e
Use fabric for shard #db{} records
Fixes _info calls on clustered views.
closes COUCHDB-2461
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/repo
Commit:
http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/commit/eb616267
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/tree/eb616267
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/diff/eb616267
Branch: refs/heads/master
Commit: eb616267ef5cdd8f76ec80322f397b50c82f4e3a
Parents: 7acb7d3
Author: Robert Newson <[email protected]>
Authored: Sat Nov 22 22:06:07 2014 +0000
Committer: Robert Newson <[email protected]>
Committed: Sat Nov 22 22:08:30 2014 +0000
----------------------------------------------------------------------
src/couch_index_server.erl | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/blob/eb616267/src/couch_index_server.erl
----------------------------------------------------------------------
diff --git a/src/couch_index_server.erl b/src/couch_index_server.erl
index 8fe4b18..76adb6a 100644
--- a/src/couch_index_server.erl
+++ b/src/couch_index_server.erl
@@ -63,7 +63,9 @@ validate(DbName, DDoc) ->
lists:foldl(ValidateFun, ok, EnabledIndexers).
-get_index(Module, <<"shards/", _/binary>>=DbName, DDoc) ->
+get_index(Module, #db{name = <<"shards/", _/binary>> = DbName}, DDoc) ->
+ get_index(Module, DbName, DDoc);
+get_index(Module, <<"shards/", _/binary>> = DbName, DDoc) ->
{Pid, Ref} = spawn_monitor(fun() ->
exit(fabric:open_doc(mem3:dbname(DbName), DDoc, [ejson_body]))
end),