Commit 4836d709 authored by Dominik Charousset's avatar Dominik Charousset

Disable `stream_serv`

The stream servers are designed to force all traffic from a node through
a single actor before stream messages cross the wire. This allows CAF to
make sure streams use bandwidth according to their priority. However,
the current implementation breaks many setups because the stream servers
are not hidden properly and don't keep track of stream states correctly
in all scenarios. Removing the stream servers fixes several bugs and
unexpected system behaviors, but splitting bandwidth according to stream
priorities now requires a new approach.
parent 05c2a8c2
......@@ -58,31 +58,11 @@ void forwarding_actor_proxy::forward_msg(strong_actor_ptr sender,
}
void forwarding_actor_proxy::enqueue(mailbox_element_ptr what,
execution_unit* context) {
execution_unit*) {
CAF_PUSH_AID(0);
CAF_ASSERT(what);
if (what->content().type_token() != make_type_token<stream_msg>()) {
forward_msg(std::move(what->sender), what->mid,
what->move_content_to_message(), &what->stages);
} else {
shared_lock<detail::shared_spinlock> guard(mtx_);
if (stream_serv_) {
// Push this actor the the forwarding stack and move the message
// to the stream_serv, which will intercept stream handshakes.
// Since the stream_serv becomes part of the pipeline, the proxy
// will never receive a stream_msg unless it is the initial handshake.
what->stages.emplace_back(ctrl());
auto msg = what->move_content_to_message();
auto prefix = make_message(sys_atom::value);
stream_serv_->enqueue(make_mailbox_element(std::move(what->sender),
what->mid,
std::move(what->stages),
prefix + msg),
context);
//what->stages.emplace_back(ctrl());
//stream_serv_->enqueue(std::move(what), context);
}
}
}
bool forwarding_actor_proxy::add_backlink(abstract_actor* x) {
......
......@@ -133,6 +133,15 @@ struct dsl_path_info {
CAF_TEST_FIXTURE_SCOPE(netstreams, point_to_point_fixture_t<remoting_config>)
CAF_TEST(stream_crossing_the_wire) {
// TODO: stream servers are currently disabled, because they break many
// possible setups by hiding remote actor handles. They must be
// re-implemented in a transparent fashion.
CAF_CHECK(true);
}
/*
CAF_TEST(stream_crossing_the_wire) {
CAF_MESSAGE("earth stream serv: " << to_string(earth.stream_serv));
CAF_MESSAGE("mars stream serv: " << to_string(mars.stream_serv));
......@@ -231,5 +240,6 @@ CAF_TEST(stream_crossing_the_wire) {
anon_send_exit(source, exit_reason::user_shutdown);
earth.sched.run();
}
*/
CAF_TEST_FIXTURE_SCOPE_END()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment