summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2010-06-01 11:06:43 -0400
committerAdam Kocoloski <adam@cloudant.com>2010-06-01 11:06:43 -0400
commitd0db79a612a0c1760465d009e4e014bacf217a06 (patch)
treed89a20dfa528b30de622307e4bd11073b1ea0c9c
parentbd976a5a78ba88a25996fc7e94c22e8a8925ccec (diff)
better get_doc_count RPC, BugzID 10242
-rw-r--r--src/fabric_rpc.erl8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl
index a8e4585b..0ac58640 100644
--- a/src/fabric_rpc.erl
+++ b/src/fabric_rpc.erl
@@ -47,13 +47,7 @@ get_db_info(DbName) ->
with_db(DbName, {couch_db, get_db_info, []}).
get_doc_count(DbName) ->
- rexi:reply(case couch_db:open(DbName, []) of
- {ok, Db} ->
- {ok, {Count, _DelCount}} = couch_btree:full_reduce(Db#db.id_tree),
- {ok, Count};
- Error ->
- Error
- end).
+ with_db(DbName, {couch_db, get_doc_count, []}).
get_update_seq(DbName) ->
rexi:reply(case couch_db:open(DbName, []) of