You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/08/01 16:35:06 UTC
[45/49] fabric commit: updated refs/heads/windsor-merge to b1c0030
Log errors when doc reads fail for _all_docs
This makes sure that we log any errors while opening a doc during an
_all_docs request. It also passes the failed DbName and DocId to the
user supplied callback function.
BugzId: 24580
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/8edaa88b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/8edaa88b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/8edaa88b
Branch: refs/heads/windsor-merge
Commit: 8edaa88b79a4ed7f75e8385c812c62aeb04b30c9
Parents: af20699
Author: Paul J. Davis <pa...@gmail.com>
Authored: Thu Dec 12 09:25:39 2013 -0600
Committer: Robert Newson <rn...@apache.org>
Committed: Fri Aug 1 15:33:43 2014 +0100
----------------------------------------------------------------------
src/fabric_view_all_docs.erl | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/8edaa88b/src/fabric_view_all_docs.erl
----------------------------------------------------------------------
diff --git a/src/fabric_view_all_docs.erl b/src/fabric_view_all_docs.erl
index cda748a..4403146 100644
--- a/src/fabric_view_all_docs.erl
+++ b/src/fabric_view_all_docs.erl
@@ -204,7 +204,18 @@ doc_receive_loop(Keys, Pids, SpawnFun, MaxJobs, Callback, AccIn) ->
end
end.
+
open_doc(DbName, Options, Id, IncludeDocs) ->
+ try
+ open_doc_int(DbName, Options, Id, IncludeDocs)
+ catch Type:Reason ->
+ Stack = erlang:get_stacktrace(),
+ couch_log:error("_all_docs open error: ~s ~s :: ~w ~w", [
+ DbName, Id, {Type, Reason}, Stack]),
+ exit({Id, Reason})
+ end.
+
+open_doc_int(DbName, Options, Id, IncludeDocs) ->
Row = case fabric:open_doc(DbName, Id, [deleted | Options]) of
{not_found, missing} ->
Doc = undefined,