You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when calling Phoenix.Tracker.graceful_permdown/1 shards are being restarted on the Tracker that we're currently in the process of shutting down.
Looking through the source code I think the problem ist that when we are passing the shards to the Supervisor, the child_spec field :restartdefaults to :permanent which according to the Supervisor docs means
:permanent - the child process is always restarted.
However, I think we actually want this:
:transient - the child process is restarted only if it terminates abnormally, i.e., with an exit reason other than :normal, :shutdown, or {:shutdown, term}.
Hey all!
I noticed that when calling
Phoenix.Tracker.graceful_permdown/1
shards are being restarted on the Tracker that we're currently in the process of shutting down.Looking through the source code I think the problem ist that when we are passing the shards to the
Supervisor
, the child_spec field:restart
defaults to:permanent
which according to the Supervisor docsmeans
However, I think we actually want this:
as in the Shard
graceful_permdown
callback we are trying to gracefully stop the Shard GenServerExplicitly specifying
restart: :transient
in https://github.com/phoenixframework/phoenix_pubsub/blob/main/lib/phoenix/tracker.ex#L328 seems to fix the issue.Does that make sense? If yes, take a look at #195
The text was updated successfully, but these errors were encountered: