couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1096132 - /couchdb/trunk/src/couchdb/couch_db_updater.erl
Date Sat, 23 Apr 2011 11:31:03 GMT
Author: fdmanana
Date: Sat Apr 23 11:31:03 2011
New Revision: 1096132

URL: http://svn.apache.org/viewvc?rev=1096132&view=rev
Log:
Add missing guard for leaf data size computation

This is necessary when dealing with pre 1.2 database files.
This could be reproduced by adding a conflict revision to an existing pre 1.2
database.


Modified:
    couchdb/trunk/src/couchdb/couch_db_updater.erl

Modified: couchdb/trunk/src/couchdb/couch_db_updater.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_db_updater.erl?rev=1096132&r1=1096131&r2=1096132&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_db_updater.erl (original)
+++ couchdb/trunk/src/couchdb/couch_db_updater.erl Sat Apr 23 11:31:03 2011
@@ -526,7 +526,7 @@ flush_trees(#db{updater_fd = Fd} = Db,
                 branch ->
                     {NewValue, Acc}
                 end;
-             {_, _, _, LeafSize} when Type =:= leaf ->
+             {_, _, _, LeafSize} when Type =:= leaf, LeafSize =/= nil ->
                 {Value, Acc + LeafSize};
              _ ->
                 {Value, Acc}



Mime
View raw message