mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Zeek/Brokerstore updates: expiration
Expiration is done separately by the manager, the clones, and the brokerstore. But - it should happen roughly at the same time.
This commit is contained in:
parent
c8a3a90339
commit
09119ae69d
7 changed files with 281 additions and 31 deletions
|
@ -1076,6 +1076,22 @@ void Manager::ProcessStoreEvent(const broker::topic& topic, broker::data msg)
|
|||
}
|
||||
table->Remove(*zeek_key, false);
|
||||
}
|
||||
else if ( auto expire = broker::store_event::expire::make(msg) )
|
||||
{
|
||||
// We just ignore expirys - expiring information on the Zeek side is handled by Zeek itself.
|
||||
#ifdef DEBUG
|
||||
// let's only debug log for stores that we know.
|
||||
auto storehandle = broker_mgr->LookupStore(expire.store_id());
|
||||
if ( ! storehandle )
|
||||
return;
|
||||
|
||||
auto table = storehandle->forward_to;
|
||||
if ( ! table )
|
||||
return;
|
||||
|
||||
DBG_LOG(DBG_BROKER, "Store %s: Store expired key %s", expire.store_id().c_str(), to_string(expire.key()).c_str());
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
else
|
||||
{
|
||||
reporter->Error("ProcessStoreEvent: Unhandled event type");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue