Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard against undefined partition worker pid #581

Commits on Jun 14, 2024

  1. 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]}}
    ```
    urmastalimaa committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    261c916 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    43f8f9c View commit details
    Browse the repository at this point in the history