This is an automated email from the ASF dual-hosted git repository. rnewson pushed a commit to branch nouveau-badmatch-fix in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 8744b7bc988da5b6b53dfc398cfaada5d7a591a3 Author: Robert Newson <[email protected]> AuthorDate: Sat Sep 16 21:39:21 2023 +0100 avoid badmatch in error cases if :update returns an error we will now return this as the process exit reason, making for a better reported error. --- src/nouveau/src/nouveau_index_manager.erl | 2 +- src/nouveau/src/nouveau_index_updater.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nouveau/src/nouveau_index_manager.erl b/src/nouveau/src/nouveau_index_manager.erl index 5afb43fc1..92135f10e 100644 --- a/src/nouveau/src/nouveau_index_manager.erl +++ b/src/nouveau/src/nouveau_index_manager.erl @@ -92,7 +92,7 @@ handle_info({'DOWN', IndexerRef, process, _Pid, Reason}, State) -> [{_, Index, Queue0}] = ets:lookup(?BY_DBSIG, DbSig), {{value, From}, Queue1} = queue:out(Queue0), case Reason of - normal -> + ok -> gen_server:reply(From, ok); {error, Msg} -> couch_log:error( diff --git a/src/nouveau/src/nouveau_index_updater.erl b/src/nouveau/src/nouveau_index_updater.erl index dfc6eb122..6aa8e5781 100644 --- a/src/nouveau/src/nouveau_index_updater.erl +++ b/src/nouveau/src/nouveau_index_updater.erl @@ -108,7 +108,7 @@ update(#index{} = Index) -> ), nouveau_api:drain_async_responses(Acc1#acc.reqids, 0), ibrowse:stop_worker_process(ConnPid), - ok = nouveau_api:set_update_seq(Index, Acc1#acc.update_seq, NewCurSeq) + exit(nouveau_api:set_update_seq(Index, Acc1#acc.update_seq, NewCurSeq)) after ret_os_process(Proc) end
