Merge pull request #20652 from shangfufei/wip-common

src/common: update some ms_* options to be more consistent

Reviewed-by: Haomai Wang <haomai@xsky.com>
This commit is contained in:
Kefu Chai 2018-03-15 14:24:22 +08:00 committed by GitHub
commit 2996068738
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -119,7 +119,7 @@ OPTION(ms_public_type, OPT_STR) // messenger backend
OPTION(ms_cluster_type, OPT_STR) // messenger backend
OPTION(ms_tcp_nodelay, OPT_BOOL)
OPTION(ms_tcp_rcvbuf, OPT_INT)
OPTION(ms_tcp_prefetch_max_size, OPT_INT) // max prefetch size, we limit this to avoid extra memcpy
OPTION(ms_tcp_prefetch_max_size, OPT_U32) // max prefetch size, we limit this to avoid extra memcpy
OPTION(ms_initial_backoff, OPT_DOUBLE)
OPTION(ms_max_backoff, OPT_DOUBLE)
OPTION(ms_crc_data, OPT_BOOL)

View File

@ -872,7 +872,7 @@ std::vector<Option> get_global_options() {
.set_default(0)
.set_description(""),
Option("ms_tcp_prefetch_max_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
Option("ms_tcp_prefetch_max_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
.set_default(4_K)
.set_description(""),

View File

@ -45,7 +45,7 @@ ostream& AsyncConnection::_conn_prefix(std::ostream *_dout) {
// Notes:
// 1. Don't dispatch any event when closed! It may cause AsyncConnection alive even if AsyncMessenger dead
const int AsyncConnection::TCP_PREFETCH_MIN_SIZE = 512;
const uint32_t AsyncConnection::TCP_PREFETCH_MIN_SIZE = 512;
const int ASYNC_COALESCE_THRESHOLD = 256;
class C_time_wakeup : public EventCallback {

View File

@ -248,7 +248,7 @@ class AsyncConnection : public Connection {
STATE_WAIT, // just wait for racing connection
};
static const int TCP_PREFETCH_MIN_SIZE;
static const uint32_t TCP_PREFETCH_MIN_SIZE;
static const char *get_state_name(int state) {
const char* const statenames[] = {"STATE_NONE",
"STATE_OPEN",