mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
GH-443: fix uses of timestamp 0 in cluster diagnostic logs
For broker.log and cluster.log: there was a race condition. A worker's first IOSource that it processes is potentially Broker if there were no packets available yet and thread scheduling happens to work out such that network connections (inside CAF threads) become established before we enter the main I/O loop. Such peering establishments would generate logs with timestamp 0 as there was not yet any code path taken that would update network_time. For reporter.log: any non-worker (packet-processing) node would just unnecessarily use a timestamp of 0 for their reporter messages.
This commit is contained in:
parent
7b56925b77
commit
430f9a92c6
4 changed files with 15 additions and 9 deletions
|
@ -491,7 +491,7 @@ void Reporter::DoLog(const char* prefix, EventHandlerPtr event, FILE* out,
|
|||
val_list vl(vl_size);
|
||||
|
||||
if ( time )
|
||||
vl.append(new Val((bro_start_network_time != 0.0) ? network_time : 0, TYPE_TIME));
|
||||
vl.append(new Val(network_time ? network_time : current_time(), TYPE_TIME));
|
||||
|
||||
vl.append(new StringVal(buffer));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue