mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
broker/Manager: Fix deletion of composite keys
Follow-up for commit 44ae8f9e8f
.
Closes #3342.
This commit is contained in:
parent
bba07cea8b
commit
9badbc5232
1 changed files with 8 additions and 2 deletions
|
@ -1338,9 +1338,15 @@ void Manager::ProcessStoreEvent(broker::data msg)
|
||||||
auto key = erase.key();
|
auto key = erase.key();
|
||||||
DBG_LOG(DBG_BROKER, "Store %s: Erase key %s", erase.store_id().c_str(),
|
DBG_LOG(DBG_BROKER, "Store %s: Erase key %s", erase.store_id().c_str(),
|
||||||
to_string(key).c_str());
|
to_string(key).c_str());
|
||||||
|
|
||||||
const auto& its = table->GetType()->AsTableType()->GetIndexTypes();
|
const auto& its = table->GetType()->AsTableType()->GetIndexTypes();
|
||||||
assert(its.size() == 1);
|
ValPtr zeek_key;
|
||||||
auto zeek_key = detail::data_to_val(key, its[0].get());
|
if ( its.size() == 1 )
|
||||||
|
zeek_key = detail::data_to_val(key, its[0].get());
|
||||||
|
else
|
||||||
|
zeek_key = detail::data_to_val(key,
|
||||||
|
table->GetType()->AsTableType()->GetIndices().get());
|
||||||
|
|
||||||
if ( ! zeek_key )
|
if ( ! zeek_key )
|
||||||
{
|
{
|
||||||
reporter->Error("ProcessStoreEvent: could not convert key \"%s\" for store \"%s\" "
|
reporter->Error("ProcessStoreEvent: could not convert key \"%s\" for store \"%s\" "
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue