rnewson commented on code in PR #5651:
URL: https://github.com/apache/couchdb/pull/5651#discussion_r2344873835


##########
src/dreyfus/src/dreyfus_index_manager.erl:
##########
@@ -66,6 +69,14 @@ handle_call({get_index, DbName, #index{sig = Sig} = Index}, 
From, State) ->
         [{_, ExistingPid}] ->
             {reply, {ok, ExistingPid}, State}
     end;
+handle_call({reopen, DbName, #index{sig = Sig} = Index}, From, State) ->
+    case ets:lookup(?BY_SIG, {DbName, Sig}) of
+        [{_, ExistingPid}] when is_pid(ExistingPid) ->
+            true = ets:delete(?BY_SIG, {DbName, Sig});
+        _ ->
+            ok
+    end,
+    handle_call({get_index, DbName, Index}, From, State);

Review Comment:
   agree that the original PR plus a delay of a few seconds is the prudent 
move. noproc should be a brief window (assuming ziose has fixed the fundamental 
issue with scalang not honouring the distributed erlang semantics).
   
   Ultimately all the complexity from faking an erlang node adds no value to 
the search solution and introduces many failure modes that just shouldn't exist.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to