Skip to content

Commit

Permalink
Don't rely on push_to() function from CAF
Browse files Browse the repository at this point in the history
  • Loading branch information
lava committed May 31, 2022
1 parent 2eb3a83 commit 23b3feb
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion libvast/src/system/partition_transformer.cpp
Expand Up @@ -35,6 +35,20 @@ void update_statistics(index_statistics& stats, const table_slice& slice) {
it.value().count += slice.rows();
}

// A local reimplementation of `caf::broadcast_downstream_manager::push_to()`,
// because that function was only added late in the 0.17.x cycle and is not
// available on the Debian 10 packaged version of CAF.
template <typename T, typename... Ts>
bool push_to(caf::broadcast_downstream_manager<T>& manager,
caf::outbound_stream_slot<T> slot, Ts&&... xs) {
auto i = manager.states().find(slot);
if (i != manager.states().end()) {
i->second.buf.emplace_back(std::forward<Ts>(xs)...);
return true;
}
return false;
}

} // namespace

void store_or_fulfill(
Expand Down Expand Up @@ -367,7 +381,7 @@ partition_transformer_actor::behavior_type partition_transformer(
for (auto& slice : buildup.slices) {
slice.offset(offset);
offset += slice.rows();
self->state.stage->out().push_to(slot, slice);
push_to(self->state.stage->out(), slot, slice);
self->state.update_type_ids_and_indexers(data.type_ids, data.id,
slice);
mutable_synopsis.add(slice, self->state.partition_capacity,
Expand Down

0 comments on commit 23b3feb

Please sign in to comment.