Skip to content

Commit

Permalink
Merge pull request #4485 from apache/couch_index_crashes
Browse files Browse the repository at this point in the history
catch and log any error from mem3:local_shards
  • Loading branch information
rnewson committed Mar 21, 2023
2 parents 8c0a177 + 937ccb6 commit 2c129d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/couch_index/src/couch_index_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,11 @@ handle_db_event(<<"shards/", _/binary>> = DbName, {ddoc_updated, DDocId}, St) ->
try
mem3:local_shards(mem3:dbname(DbName))
catch
error:database_does_not_exist ->
Class:Msg ->
couch_log:warning(
"~p got ~p:~p when fetching local shards for ~p",
[?MODULE, Class, Msg, DbName]
),
[]
end,
DbShards = [mem3:name(Sh) || Sh <- LocalShards],
Expand Down

0 comments on commit 2c129d1

Please sign in to comment.