You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/07/05 21:22:37 UTC

[GitHub] wohali opened a new issue #647: Race condition with ddoc deletion/recreation with same signature

wohali opened a new issue #647: Race condition with ddoc deletion/recreation with same signature
URL: https://github.com/apache/couchdb/issues/647
 
 
   See #548 for the history on this one. Quoting @kocolosk on how our test suite worked prior to #646 landing:
   
   > In many cases we have consecutive invocations where the ddocs have the same computed signature. It looks like we're hitting a race condition where we request to delete a ddoc, the server starts closing all the associated indexes, we create a new one with the same sig, the coordinator grabs an Fd from the cache with that sig, and the Fd is closed underneath it during the response.
   
   And to motivate continued work on this:
   
   > I think it is possible to observe this bug in normal operations, especially if a user is following the best practice around ddoc upgrades. Deleting the temporary ddoc after migrating the main one could easily kill any in-progress view responses.
   
   ## Expected Behaviour
   Deleting, then recreating a ddoc with the same body (and thus the same computed signature) should not hit a race condition where the newly created ddoc indexes get reaped by the previously invoked ddoc deletion - especially when following the CouchDB best practice around ddoc upgrades in production environments.
   
   ## Current Behaviour
   See the overview above.
   
   ## Steps to Reproduce (for bugs)
   Wind your repository back prior to #646 landing and run the `reduce_builtin.js` test suite in a loop.
   We should write a new test harness for just this bug, should be easy to hit if we do so from within Erlang, for instance.
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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