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 2018/09/06 16:37:47 UTC

[GitHub] nickva commented on a change in pull request #1596: Fix couch server race condition

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

 ##########
 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:
   Will Db ever be undefined here, then maybe a catch around it?

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