diff options
-rw-r--r-- | apps/couch/src/couch_db.erl | 6 | ||||
-rw-r--r-- | apps/couch/src/couch_db_updater.erl | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/apps/couch/src/couch_db.erl b/apps/couch/src/couch_db.erl index a3112e24..0e42980e 100644 --- a/apps/couch/src/couch_db.erl +++ b/apps/couch/src/couch_db.erl @@ -268,8 +268,10 @@ get_db_info(Db) -> ], {ok, InfoList}. -get_design_docs(#db{name = <<"shards/", _:18/binary, DbName/binary>>}) -> - {_, Ref} = spawn_monitor(fun() -> exit(fabric:design_docs(DbName)) end), +get_design_docs(#db{name = <<"shards/", _/binary>> = ShardName}) -> + {_, Ref} = spawn_monitor(fun() -> + exit(fabric:design_docs(mem3:dbname(ShardName))) + end), receive {'DOWN', Ref, _, _, Response} -> Response end; diff --git a/apps/couch/src/couch_db_updater.erl b/apps/couch/src/couch_db_updater.erl index a687440b..ab078caf 100644 --- a/apps/couch/src/couch_db_updater.erl +++ b/apps/couch/src/couch_db_updater.erl @@ -461,8 +461,8 @@ refresh_validate_doc_funs(Db) -> end end, DesignDocs), case Db#db.name of - <<"shards/", _:18/binary, DbName/binary>> -> - fabric:reset_validation_funs(DbName), + <<"shards/", _/binary>> = ShardName -> + fabric:reset_validation_funs(mem3:dbname(ShardName)), Db#db{validate_doc_funs=undefined}; _ -> Db#db{validate_doc_funs=ProcessDocFuns} |