davisp commented on a change in pull request #1596: Fix couch server race 
condition
URL: https://github.com/apache/couchdb/pull/1596#discussion_r215696991
 
 

 ##########
 File path: src/couch/src/couch_server.erl
 ##########
 @@ -421,27 +425,37 @@ handle_call({open_result, T0, DbName, {ok, Db}}, 
{FromPid, _Tag}, Server) ->
                 true ->
                     Server#server.lru
             end,
-            {reply, ok, Server#server{lru = Lru}}
+            {reply, ok, Server#server{lru = Lru}};
+        [#entry{}] ->
+            % A mismatched opener pid means that this open_result message
+            % was in our mailbox but is now stale. Mostly ignore
+            % it except to ensure that the db pid is super dead.
+            exit(couch_db:get_pid(Db), kill),
 
 Review comment:
   If it does then we have bigger problems as this is an {ok, Db} result we're 
handling specifically.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to