Skip to content

Commit

Permalink
Merge pull request #587 from zmstone/guard_against_undefined_pid_in_g…
Browse files Browse the repository at this point in the history
…et_partition_worker

Guard against undefined pid in get partition worker
  • Loading branch information
zmstone authored Jun 26, 2024
2 parents 01ad88e + afe4dfb commit cef61de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
- Made brod-cli to work on OTP 26. [PR#582](https://github.com/kafka4beam/brod/pull/582)
- `--ssl` option is now mandatory if TLS is to be used (previously it can be derived from `--cacertfile` option)
- TLS version defaults to 1.2, added `--ssl-versions` to support explictly setting TLS 1.3
- Support building on OTP 27 [PR#585](https://github.com/kafka4beam/brod/pull/585)
Also fixed rebar.lock for dependency `kafka_protocol-4.1.5`
- Guard against crashes in `brod_client:get_consumer/3` [PR#587](https://github.com/kafka4beam/brod/pull/587) (originally [PR#581](https://github.com/kafka4beam/brod/pull/581))

- 3.19.0
- Forward unhandled messages in topic/group consumer processes to handle_info/2 callbacks
Expand Down
2 changes: 1 addition & 1 deletion src/brod_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ get_partition_worker(ClientId, Key) when is_atom(ClientId) ->
%% If the worker process is returned form ets,
%% but it is not alive then there must be
%% an in-flight worker deregistration request.
case is_process_alive(Pid) of
case is_pid(Pid) andalso is_process_alive(Pid) of
true -> {ok, Pid};
false -> get_partition_worker_with_ets(ClientId, Key)
end;
Expand Down

0 comments on commit cef61de

Please sign in to comment.