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 20:36:07 GMT
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 5530204a36cf12ea8edbf3d3f57ca92d27e39b84
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