You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/04/12 17:52:53 UTC

[GitHub] [couchdb] chewbranca commented on a change in pull request #2003: Don't reset_index if read_header fails

chewbranca commented on a change in pull request #2003: Don't reset_index if read_header fails
URL: https://github.com/apache/couchdb/pull/2003#discussion_r275006284
 
 

 ##########
 File path: src/couch_mrview/src/couch_mrview_index.erl
 ##########
 @@ -122,7 +122,7 @@ open(Db, State0) ->
 
     case couch_mrview_util:open_file(IndexFName) of
         {ok, Fd} ->
-            case (catch couch_file:read_header(Fd)) of
+            case couch_file:read_header(Fd) of
 
 Review comment:
   So what happens when there's an error? I definitely think we should only trigger the index reset upon `no_valid_header`, but dropping the `catch` changes behavior to where errors can now bubble up out of this function, which may or may not be a good idea.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services