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/04/19 13:56:06 UTC
[couchdb] 10/10: TEMPORARY: Debugging broken use of the reduce
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch COUCHDB-3287-pluggable-storage-engines
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 8fcc1385691e64b04edf736dbdb6c8b272c8d076
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Mar 23 16:15:16 2017 -0500
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.
---
src/couch/src/couch_bt_engine.erl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/couch/src/couch_bt_engine.erl b/src/couch/src/couch_bt_engine.erl
index 0cd9d65..8e6aabc 100644
--- a/src/couch/src/couch_bt_engine.erl
+++ b/src/couch/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 ->
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.