mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
broker::Manager: No more network_time forwarding
network_time forwarding will happen in the main-loop before draining the EventMgr so timers/events scheduled based on broker messages should behave similarly. This also keeps network_time unaffected during non pseudo-realtime trace processing.
This commit is contained in:
parent
c30b5cbc4d
commit
3269310e61
1 changed files with 7 additions and 6 deletions
|
@ -1140,11 +1140,6 @@ void Manager::DispatchMessage(const broker::topic& topic, broker::data msg)
|
|||
|
||||
void Manager::Process()
|
||||
{
|
||||
// Ensure that time gets update before processing broker messages, or events
|
||||
// based on them might get scheduled wrong.
|
||||
if ( use_real_time )
|
||||
run_state::detail::update_network_time(util::current_time());
|
||||
|
||||
auto messages = bstate->subscriber.poll();
|
||||
|
||||
bool had_input = ! messages.empty();
|
||||
|
@ -1221,12 +1216,18 @@ void Manager::Process()
|
|||
if ( had_input )
|
||||
{
|
||||
if ( run_state::network_time == 0 )
|
||||
{
|
||||
// If we're getting Broker messages, but still haven't initialized
|
||||
// run_state::network_time, may as well do so now because otherwise the
|
||||
// broker/cluster logs will end up using timestamp 0.
|
||||
//
|
||||
// Do not do this when allow_network_time_forard is set to F
|
||||
// with the assumption that this is unwanted behavior.
|
||||
if ( get_option("allow_network_time_forward")->AsBool() )
|
||||
run_state::detail::update_network_time(util::current_time());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Manager::ProcessStoreEventInsertUpdate(const TableValPtr& table, const std::string& store_id,
|
||||
const broker::data& key, const broker::data& data,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue