You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2017/03/23 21:16:12 UTC

couch commit: updated refs/heads/COUCHDB-3287-pluggable-storage-engines to 005ac9c

Repository: couchdb-couch
Updated Branches:
  refs/heads/COUCHDB-3287-pluggable-storage-engines 0f4e1a7fd -> 005ac9c20


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/005ac9c2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/005ac9c2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/005ac9c2

Branch: refs/heads/COUCHDB-3287-pluggable-storage-engines
Commit: 005ac9c20f722931a54f4b07021c1e1a02015c1c
Parents: 0f4e1a7
Author: Paul J. Davis <pa...@gmail.com>
Authored: Thu Mar 23 16:15:16 2017 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Thu Mar 23 16:15:16 2017 -0500

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/005ac9c2/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 ->