couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [31/36] couch commit: updated refs/heads/COUCHDB-3287-pluggable-storage-engines to 0fbcd0c
Date Thu, 06 Apr 2017 16:16:45 GMT
TEMPORARY: Debugging broken use of the reduce

PSE branch shows a badrecord for full_doc_info when its used here.
Trying to track down what's being fed to it that's causing that.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/0fbcd0c7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/0fbcd0c7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/0fbcd0c7

Branch: refs/heads/COUCHDB-3287-pluggable-storage-engines
Commit: 0fbcd0c730ad3eb3b97d9dc21ecf2b3c1f7070d1
Parents: 4b42387
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Thu Mar 23 16:15:16 2017 -0500
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Thu Apr 6 11:15:58 2017 -0500

----------------------------------------------------------------------
 src/couch_bt_engine.erl | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/0fbcd0c7/src/couch_bt_engine.erl
----------------------------------------------------------------------
diff --git a/src/couch_bt_engine.erl b/src/couch_bt_engine.erl
index 3b31341..37ffacd 100644
--- a/src/couch_bt_engine.erl
+++ b/src/couch_bt_engine.erl
@@ -528,6 +528,10 @@ id_tree_join(Id, {HighSeq, Deleted, Sizes, DiskTree}) ->
 
 id_tree_reduce(reduce, FullDocInfos) ->
     lists:foldl(fun(Info, {NotDeleted, Deleted, Sizes}) ->
+        if is_record(Info, full_doc_info) -> ok; true ->
+            {_, Stack} = erlang:process_info(self(), current_stacktrace),
+            erlang:error({invalid_fdi, Info, Stack})
+        end,
         Sizes2 = reduce_sizes(Sizes, Info#full_doc_info.sizes),
         case Info#full_doc_info.deleted of
         true ->


Mime
View raw message