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 2020/01/10 15:59:29 UTC

[GitHub] [couchdb] rnewson opened a new pull request #2438: Reset a view shard if the signature is wrong

rnewson opened a new pull request #2438: Reset a view shard if the signature is wrong
URL: https://github.com/apache/couchdb/pull/2438
 
 
   We encountered a case_clause error when reading the header for a .view
   file as the response was {ok, {Sig, nil}} where Sig is neither the
   expected sig or the pre-upgrade sig (though surely the pre-1.2 goop is
   not firing anymore).
   
   We now log this specific issue and then proceed as if we found no
   valid header.
   

----------------------------------------------------------------
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

[GitHub] [couchdb] rnewson commented on a change in pull request #2438: Reset a view shard if the signature is wrong

Posted by GitBox <gi...@apache.org>.
rnewson commented on a change in pull request #2438: Reset a view shard if the signature is wrong
URL: https://github.com/apache/couchdb/pull/2438#discussion_r365322433
 
 

 ##########
 File path: src/couch_mrview/src/couch_mrview_index.erl
 ##########
 @@ -127,6 +127,12 @@ open(Db, State0) ->
                     NewSt = couch_mrview_util:init_state(Db, Fd, State, Header),
                     ensure_local_purge_doc(Db, NewSt),
                     {ok, NewSt};
+                {ok, {WrongSig, _}} ->
 
 Review comment:
   I'm tempted to generalize further to `{ok, BadHeader}` or somesuch.

----------------------------------------------------------------
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

[GitHub] [couchdb] davisp commented on a change in pull request #2438: Reset a view shard if the signature is wrong

Posted by GitBox <gi...@apache.org>.
davisp commented on a change in pull request #2438: Reset a view shard if the signature is wrong
URL: https://github.com/apache/couchdb/pull/2438#discussion_r365329706
 
 

 ##########
 File path: src/couch_mrview/src/couch_mrview_index.erl
 ##########
 @@ -127,6 +127,12 @@ open(Db, State0) ->
                     NewSt = couch_mrview_util:init_state(Db, Fd, State, Header),
                     ensure_local_purge_doc(Db, NewSt),
                     {ok, NewSt};
+                {ok, {WrongSig, _}} ->
 
 Review comment:
   I'd rather not generalize here as I don't like that we're getting `{ok, SomethingBad}` and I'd rather force our hand if it comes to that rather than just resetting and papering over something likely serious. The headers are all md5'ed so its got to be programmer error of some sort at that level.

----------------------------------------------------------------
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

[GitHub] [couchdb] rnewson commented on a change in pull request #2438: Reset a view shard if the signature is wrong

Posted by GitBox <gi...@apache.org>.
rnewson commented on a change in pull request #2438: Reset a view shard if the signature is wrong
URL: https://github.com/apache/couchdb/pull/2438#discussion_r365322433
 
 

 ##########
 File path: src/couch_mrview/src/couch_mrview_index.erl
 ##########
 @@ -127,6 +127,12 @@ open(Db, State0) ->
                     NewSt = couch_mrview_util:init_state(Db, Fd, State, Header),
                     ensure_local_purge_doc(Db, NewSt),
                     {ok, NewSt};
+                {ok, {WrongSig, _}} ->
 
 Review comment:
   I'm tempted to generalize further to `{ok, WeirdHeader}` or somesuch.

----------------------------------------------------------------
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

[GitHub] [couchdb] rnewson merged pull request #2438: Reset a view shard if the signature is wrong

Posted by GitBox <gi...@apache.org>.
rnewson merged pull request #2438: Reset a view shard if the signature is wrong
URL: https://github.com/apache/couchdb/pull/2438
 
 
   

----------------------------------------------------------------
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