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

Oban.Pro.Relay.async may cause genservers to die on timeout #1195

Closed
3 tasks done
caioaao opened this issue Nov 28, 2024 · 0 comments
Closed
3 tasks done

Oban.Pro.Relay.async may cause genservers to die on timeout #1195

caioaao opened this issue Nov 28, 2024 · 0 comments
Labels
area:pro Related to Oban Pro kind:bug Something isn't working

Comments

@caioaao
Copy link

caioaao commented Nov 28, 2024

Precheck

  • Do a quick search and make sure the bug has not yet been reported
  • For support, favor using the Elixir Forum, Slack, IRC, etc.
  • Be friendly and polite!

Environment

  • Oban Version 1.4.13
  • PostgreSQL Version: 14.x
  • Elixir & Erlang/OTP Versions (elixir --version): erlang 27.1; elixir 1.17.3

Current Behavior

  1. Call Oban.Pro.Relay.async(...) |> Oban.Pro.Relay.await() from inside a GenServer process
  2. await() times out
  3. Job finishes after await() timeout
  4. The {:notification, :relay, %{...}} message is produced, but this time it is caught by the GenServer receive loop. If there's no handle_info to deal with this, the GenServer will die with an error something like this:
GenServer #PID<*> terminating ** (FunctionClauseError) no function clause matching in MyApp.Server.handle_info/2     (foo 0.1.0) lib/my_app/server.ex:31: MyApp.Server.handle_info({:notification, :relay, %{"ref" => "*", "result" => ...})

Expected Behavior

The choice of using a {:notification, :relay} message passed to the calling process shouldn't leak outside of the Relay.async and Relay.await functions

@sorentwo sorentwo added kind:bug Something isn't working area:pro Related to Oban Pro labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:pro Related to Oban Pro kind:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants