couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [couchdb] 05/09: Avoid bad match on really old databases
Date Wed, 27 Sep 2017 19:57:55 GMT
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch COUCHDB-3288-mixed-cluster-upgrade
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 1c5e136b34042b1da11fae156542468a6fd28f41
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
AuthorDate: Wed May 10 10:12:14 2017 -0500

    Avoid bad match on really old databases
    
    COUCHDB-3288
---
 src/couch/src/couch_db.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/couch/src/couch_db.erl b/src/couch/src/couch_db.erl
index 183a6b4..4a86f08 100644
--- a/src/couch/src/couch_db.erl
+++ b/src/couch/src/couch_db.erl
@@ -393,8 +393,8 @@ get_pid(#db{main_pid = Pid}) ->
     Pid.
 
 get_doc_count(Db) ->
-    {ok, {Count, _, _}} = couch_btree:full_reduce(Db#db.id_tree),
-    {ok, Count}.
+    {ok, Reds} = couch_btree:full_reduce(Db#db.id_tree),
+    {ok, element(1, Reds)}.
 
 get_uuid(#db{}=Db) ->
     couch_db_header:uuid(Db#db.header).

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <commits@couchdb.apache.org>.

Mime
View raw message