Github user davisp commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch-mrview/pull/67#discussion_r105942223
  
    --- Diff: src/couch_mrview_index.erl ---
    @@ -230,20 +230,23 @@ update_local_purge_doc(Db, State) ->
     
     verify_index_exists(Options) ->
         ShardDbName = couch_mrview_util:get_value_from_options(<<"dbname">>, 
Options),
    -    IndexName = couch_mrview_util:get_value_from_options(<<"indexname">>, 
Options),
    +    DDocId = couch_mrview_util:get_value_from_options(<<"ddoc_id">>, 
Options),
         SigInLocal = couch_mrview_util:get_value_from_options(<<"signature">>, 
Options),
         case couch_db:open_int(ShardDbName, []) of
             {ok, Db} ->
                 try
    -                DbName =mem3:dbname(Db#db.name),
    -                case ddoc_cache:open(DbName, IndexName) of
    +                DbName = mem3:dbname(Db#db.name),
    +                case ddoc_cache:open(DbName, DDocId) of
                         {ok, DDoc} ->
                             {ok, IdxState} = 
couch_mrview_util:ddoc_to_mrst(ShardDbName, DDoc),
                             couch_index_util:hexsig(IdxState#mrst.sig) == 
SigInLocal;
                         _Else ->
                             false
                     end
    -            catch _:_ ->
    +            catch E:T ->
    +                Stack = erlang:get_stacktrace(),
    +                couch_log:error("Error occurs when verifying existence of 
index: ~p ~p",
    +                    [{E, T}, Stack]),
    --- End diff --
    
    I would change that to ... "verifying existince of ~s/~s :: ~p ~p", 
[ShardDbName, DDocId, {E, T}, Stack]


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to