davisp commented on a change in pull request #1182: fixed race is_idle
URL: https://github.com/apache/couchdb/pull/1182#discussion_r170678020
 
 

 ##########
 File path: src/couch/src/couch_server.erl
 ##########
 @@ -77,16 +77,20 @@ open(DbName, Options0) ->
     case ets:lookup(couch_dbs, DbName) of
     [#entry{db = Db0, lock = Lock} = Entry] when Lock =/= locked ->
         update_lru(DbName, Entry#entry.db_options),
-        {ok, Db1} = couch_db:incref(Db0),
-        couch_db:set_user_ctx(Db1, Ctx);
+        case couch_db:incref(Db0) of
+            {down,Db0} -> open(DbName, Options0);
 
 Review comment:
   And we should also do the same retry limiting for create as well.

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