Unrecognized cast: {:untrack, pid}
- Dominant language
- Elixir
- Stars
- 1.3k
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
I'm not sure if it actually causes a problem or not, but my logs sometimes show lines like these
```
2019-02-25 23:55:35.676 [warn] [swarm on web@100.96.20.105] [tracker:handle_cast] unrecognized cast: {:untrack, #PID<0.583.0>}
2019-02-25 23:55:35.676 [warn] [swarm on web@100.96.20.105] [tracker:handle_cast] unrecognized cast: {:track, MyApp.Scheduler.TaskRegistry, #PID<39255.580.0>, %{mfa: {Quantum.TaskRegistry, :start_link, [%Quantum.TaskRegistry.StartOpts{name: MyApp.Scheduler.TaskRegistry}]}}}
2019-02-25 23:55:35.676 [warn] [swarm on web@100.96.20.105] [tracker:handle_cast] unrecognized cast: {:untrack, #PID<0.584.0>}
2019-02-25 23:55:35.677 [warn] [swarm on web@100.96.20.105] [tracker:handle_cast] unrecognized cast: {:track, MyApp.Scheduler.JobBroadcaster, #PID<39255.581.0>, %{mfa: {Quantum.JobBroadcaster, :start_link, [%Quantum.JobBroadcaster.StartOpts{debug_logging: true, jobs: [...jobs here...]}}}
```
Taken from https://github.com/quantum-elixir/quantum-core/issues/398
My guess is that something is sending the `:track` and `:untrack` messages as casts instead of calls. [This line](https://github.com/bitwalker/swarm/blob/master/lib/swarm/tracker/tracker.ex#L1159) expects the message to be a call, and [this line](https://github.com/bitwalker/swarm/blob/master/lib/swarm/tracker/tracker.ex#L94) sends the message as a call.
[This line](https://github.com/bitwalker/swarm/blob/master/lib/swarm/tracker/tracker.ex#L1597), however, sends the message as a cast so my guess is this is the culprit. Perhaps simply changing it to a call will fix the issue?
I'm on swarm 3.4.0.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in lib/swarm/tracker/tracker.ex at the call and cast handling around lines 94, 1159, and 1597, then compare those paths with the warnings reported from Quantum. Reproduce the :track and :untrack messages and determine whether the tracker still logs them as unrecognized casts; done means the reported warnings are resolved without breaking tracking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100