Skip to content

Commit

Permalink
msg: remove SimpleMessenger
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Mar 17, 2019
1 parent 04dad6b commit e57af1d
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 4,835 deletions.
3 changes: 1 addition & 2 deletions doc/dev/messenger.rst
Expand Up @@ -3,8 +3,7 @@
============================

Messenger is the Ceph network layer implementation. Currently Ceph supports
three messenger type "simple", "async" and "xio". The latter two are both
experiment features and shouldn't use them in production environment.
one messenger type: "async".

ceph_perf_msgr
==============
Expand Down
1 change: 0 additions & 1 deletion src/common/legacy_config_opts.h
Expand Up @@ -133,7 +133,6 @@ OPTION(ms_bind_retry_count, OPT_INT) // If binding fails, how many times do we r
OPTION(ms_bind_retry_delay, OPT_INT) // Delay between attempts to bind
OPTION(ms_bind_before_connect, OPT_BOOL)
OPTION(ms_tcp_listen_backlog, OPT_INT)
OPTION(ms_rwthread_stack_bytes, OPT_U64)
OPTION(ms_tcp_read_timeout, OPT_U64)
OPTION(ms_pq_max_tokens_per_priority, OPT_U64)
OPTION(ms_pq_min_cost, OPT_U64)
Expand Down
4 changes: 0 additions & 4 deletions src/common/options.cc
Expand Up @@ -1002,10 +1002,6 @@ std::vector<Option> get_global_options() {
.set_default(512)
.set_description("Size of queue of incoming connections for accept(2)"),

Option("ms_rwthread_stack_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
.set_default(1_M)
.set_description("Size of stack for SimpleMessenger read/write threads"),

Option("ms_tcp_read_timeout", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
.set_default(900)
.set_description("Time before an idle TCP connection is closed (seconds)"),
Expand Down
6 changes: 1 addition & 5 deletions src/msg/CMakeLists.txt
Expand Up @@ -3,11 +3,7 @@ set(msg_srcs
Message.cc
Messenger.cc
QueueStrategy.cc
msg_types.cc
simple/Accepter.cc
simple/Pipe.cc
simple/PipeConnection.cc
simple/SimpleMessenger.cc)
msg_types.cc)

if(HAVE_XIO)
list(APPEND msg_srcs
Expand Down
8 changes: 3 additions & 5 deletions src/msg/Messenger.cc
Expand Up @@ -8,7 +8,6 @@

#include "Messenger.h"

#include "msg/simple/SimpleMessenger.h"
#include "msg/async/AsyncMessenger.h"
#ifdef HAVE_XIO
#include "msg/xio/XioMessenger.h"
Expand All @@ -28,11 +27,10 @@ Messenger *Messenger::create(CephContext *cct, const string &type,
{
int r = -1;
if (type == "random") {
r = ceph::util::generate_random_number(0, 1);
r = 0;
//r = ceph::util::generate_random_number(0, 1);
}
if (r == 0 || type == "simple")
return new SimpleMessenger(cct, name, std::move(lname), nonce);
else if (r == 1 || type.find("async") != std::string::npos)
if (r == 0 || type.find("async") != std::string::npos)
return new AsyncMessenger(cct, name, type, std::move(lname), nonce);
#ifdef HAVE_XIO
else if ((type == "xio") &&
Expand Down
4 changes: 2 additions & 2 deletions src/msg/SimplePolicyMessenger.h
Expand Up @@ -84,9 +84,9 @@ class SimplePolicyMessenger : public Messenger
* start() or bind().
*
* @param type The peer type this Throttler will apply to.
* @param t The Throttler to apply. SimpleMessenger does not take
* @param t The Throttler to apply. The messenger does not take
* ownership of this pointer, but you must not destroy it before
* you destroy SimpleMessenger.
* you destroy messenger.
*/
void set_policy_throttlers(int type,
Throttle* byte_throttle,
Expand Down

0 comments on commit e57af1d

Please sign in to comment.