nickva commented on code in PR #4491:
URL: https://github.com/apache/couchdb/pull/4491#discussion_r1144944550
##########
src/couch_index/src/couch_index_server.erl:
##########
@@ -203,6 +210,9 @@ handle_info({'EXIT', Pid, Reason}, Server) ->
ets:match_object(Server#st.by_db, {DbName, {'$1', Sig}})
],
rem_from_ets(DbName, Sig, DDocIds, Pid, Server);
+ [{_, opening, {DbName, Sig}}] when Reason /= normal ->
+ Msg = {async_error, {DbName, nil, Sig}, Reason},
+ {reply, ok, _} = handle_call(Msg, {Pid, nil}, Server);
Review Comment:
This mirrors the pattern in dreyfus manager, but wonder if it makes sense to
clean it up and just have a separate handle_async_error(DbName, Sig, OpenerPid,
Error) function to call from `handle_call/3` and when opener crashes.
--
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]