Skip to content

Commit

Permalink
Merge pull request #5092 from apache/nouveau-manager-crash-fix
Browse files Browse the repository at this point in the history
don't crash nouveau_index_updater for any DOWN Reason
  • Loading branch information
rnewson committed Jun 18, 2024
2 parents 3dee4e7 + 03f2f1f commit 031e762
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/nouveau/src/nouveau_index_manager.erl
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,22 @@ handle_info({'DOWN', IndexerRef, process, _Pid, Reason}, State) ->
true = ets:delete(?BY_REF, IndexerRef),
[{_, Index, Queue0}] = ets:lookup(?BY_DBSIG, DbSig),
{{value, From}, Queue1} = queue:out(Queue0),
case Reason of
ok ->
gen_server:reply(From, ok);
{error, Msg} ->
if
Reason /= ok ->
couch_log:error(
"~p: db:~s ddoc:~s index:~s failed with: ~p",
[
?MODULE,
mem3:dbname(Index#index.dbname),
Index#index.ddoc_id,
Index#index.name,
Msg
Reason
]
),
gen_server:reply(From, {error, Msg})
);
true ->
ok
end,
gen_server:reply(From, Reason),
case queue:is_empty(Queue1) of
true ->
true = ets:delete(?BY_DBSIG, DbSig);
Expand Down

0 comments on commit 031e762

Please sign in to comment.