Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Guard against undefined partition worker pid
I've observed a data race when starting a consumer from within another consumer (using co-partitioned topics), where the call to `get_partition_worker` fails due to badarg in `is_process_alive`. It seems that 1f2290b ("Verify partition worker process is alive.", 2022-05-19) already tried to resolve the data race, but did not consider the possibility that the lookup returns `undefined`. Example exit report from Elixir logger: ``` Last message: {:EXIT, #PID<0.2613.0>, {:badarg, [{:erlang, :is_process_alive, [:undefined], [error_info: %{module: :erl_erts_errors}]}, {:brod_client, :get_partition_worker, 2, [file: ~c"/app/deps/brod/src/brod_client.erl", line: 496]}, ...MyCallChain]}} ```
- Loading branch information