wohali opened a new pull request #501: Fix error on race condition in mem3 
startup
URL: https://github.com/apache/couchdb/pull/501
 
 
   During mem3 startup, 2 paths attempt to call `couch_server:create/2` on
   `_dbs`:
   
   ```
   gen_server:init_it/6
     -> mem3_shards:init/1
       -> mem3_shards:get_update_seq/0
         -> couch_server:create/2
   ```
   
   and
   
   ```
   mem3_sync:initial_sync/1
     -> mem3_shards:fold/2
       -> couch_server:create/2
   ```
   
   Normally, the first path completes before the second. If the second path
   finishes first, the first path fails because it does not expect a
   `file_exists` response.
   
   This patch simply retries mem3_util:ensure_exists/1 once if it gets back
   a `file_exists` response. Any failures past this point are not handled.
   
   Fixes COUCHDB-3402.
   
   /cc @davisp @nickva 
 
----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to