Merge remote-tracking branch 'origin/topic/neverlord/1336'

* origin/topic/neverlord/1336:
  Fix subtle race on data store initialization
This commit is contained in:
Jon Siwek 2020-12-23 10:36:09 -08:00
commit 7cf08d4e58

View file

@ -37,7 +37,11 @@ event zeek_init()
} }
# Send the auto masters we created to the newly connected node # Send the auto masters we created to the newly connected node
event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string) &priority=1 # Note: this is specifically chosen to be higher priority than the
# Broker::peer_added event in cluster/main.zeek which sends the
# Cluster::hello event to prevent a race on whether that Cluster::hello
# ends up generating Cluster::node_up before Broker::announce_masters.
event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string) &priority=11
{ {
if ( ! Cluster::is_enabled() ) if ( ! Cluster::is_enabled() )
return; return;