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/04/26 07:54:17 UTC

[GitHub] [couchdb] nickva commented on pull request #2820: Add a couch_views test for multiple design documents with the same map

nickva commented on pull request #2820:
URL: https://github.com/apache/couchdb/pull/2820#issuecomment-619504341


   I updated the PR to meck the view write function so we can assert  that the index is not actually updated. 
   
   I had also noticed that sometimes when we return from `wait_for_job/4` https://github.com/apache/couchdb/blob/30fdef77571c67c945d70fb54c07157c4643f828/src/couch_views/src/couch_views_jobs.erl#L94 when we query, the job could still running since we check the ViewSeq and UpdateSeq only in the data then unsubscribe. https://github.com/apache/couchdb/blob/30fdef77571c67c945d70fb54c07157c4643f828/src/couch_views/src/couch_views_jobs.erl#L118. So I added a function to also ensure the job is finished. This is to make the test is more deterministic.
   
   @tonysun83 good question about how to trigger that retry line. I think it would have to be something like a job with the old (now deleted ddoc) was running when the client with the current (not-deleted) doc id started the query. Then the job with the deleted doc would crash with the `ddoc_deleted` error, the client with the current ddoc would get the error and then `retry`. On retry, it will re-add the job which, if it is in a `pending` or `finished` state now update it with the non-deleted design doc id.


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