Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.6.5
-
Untriaged
-
0
-
Unknown
Description
init([]) ->
|
Master = mb_master:master_node(),
|
|
Self = self(),
|
ns_pubsub:subscribe_link(leader_events,
|
case _ of
|
{new_leader, _} = Event ->
|
Self ! Event;
|
_ ->
|
ok
|
end),
|
We can see here that there's a tiny race condition: new_leader event might come after mb_master:master_node() returned undefined, but before the subscription to the event is established. In this case the event is lost and ns_tick_agent won't get another notification until the new master election occures.