mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
cluster/main: Remove extra @if ( Cluster::is_enabled() )
These have been discussed in the context of "@if &analyze" [1] and am much in favor for not disabling/removing ~100 lines (more than fits on a single terminal) out from the middle of a file. There's no performance impact for having these handlers enabled unconditionally. Also, any future work on "@if &analyze" will look at them again which we could also skip. This also reverts back to the behavior where the Cluster::LOG stream is created even in non cluster setups like in previous Zeek versions. As long as no one writes to it there's essentially no difference. If someone does write to Cluster::LOG, I'd argue not black holing these messages is better. Schema generators using Log::active_streams will continue to discover Cluster::LOG even if they run in non-cluster mode. https://github.com/zeek/zeek/pull/3062#discussion_r1200498905
This commit is contained in:
parent
359eec4297
commit
eef7acc1e9
3 changed files with 18 additions and 7 deletions
|
@ -347,8 +347,6 @@ function nodeid_topic(id: string): string
|
|||
return nodeid_topic_prefix + id + "/";
|
||||
}
|
||||
|
||||
@if ( Cluster::is_enabled() )
|
||||
|
||||
event Cluster::hello(name: string, id: string) &priority=10
|
||||
{
|
||||
if ( name !in nodes )
|
||||
|
@ -423,8 +421,6 @@ event zeek_init() &priority=5
|
|||
Log::create_stream(Cluster::LOG, [$columns=Info, $path="cluster", $policy=log_policy]);
|
||||
}
|
||||
|
||||
@endif
|
||||
|
||||
function create_store(name: string, persistent: bool &default=F): Cluster::StoreInfo
|
||||
{
|
||||
local info = stores[name];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue