remove rpc var
This commit is contained in:
parent
84b30e0784
commit
0190759280
|
@ -23,9 +23,6 @@ extern "C" {
|
||||||
#include "tdef.h"
|
#include "tdef.h"
|
||||||
|
|
||||||
// common
|
// common
|
||||||
extern int tsRpcTimer;
|
|
||||||
extern int tsRpcMaxTime;
|
|
||||||
extern int tsRpcForceTcp; // all commands go to tcp protocol if this is enabled
|
|
||||||
extern int32_t tsMaxConnections;
|
extern int32_t tsMaxConnections;
|
||||||
extern int32_t tsMaxShellConns;
|
extern int32_t tsMaxShellConns;
|
||||||
extern int32_t tsShellActivityTimer;
|
extern int32_t tsShellActivityTimer;
|
||||||
|
|
|
@ -29,9 +29,6 @@
|
||||||
|
|
||||||
|
|
||||||
// common
|
// common
|
||||||
int32_t tsRpcTimer = 300;
|
|
||||||
int32_t tsRpcMaxTime = 600; // seconds;
|
|
||||||
int32_t tsRpcForceTcp = 1; // disable this, means query, show command use udp protocol as default
|
|
||||||
int32_t tsMaxShellConns = 50000;
|
int32_t tsMaxShellConns = 50000;
|
||||||
int32_t tsMaxConnections = 50000;
|
int32_t tsMaxConnections = 50000;
|
||||||
int32_t tsShellActivityTimer = 3; // second
|
int32_t tsShellActivityTimer = 3; // second
|
||||||
|
@ -302,37 +299,6 @@ static void doInitGlobalConfig(void) {
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||||
taosAddConfigOption(cfg);
|
taosAddConfigOption(cfg);
|
||||||
|
|
||||||
cfg.option = "rpcTimer";
|
|
||||||
cfg.ptr = &tsRpcTimer;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT;
|
|
||||||
cfg.minValue = 100;
|
|
||||||
cfg.maxValue = 3000;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_MS;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "rpcForceTcp";
|
|
||||||
cfg.ptr = &tsRpcForceTcp;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT;
|
|
||||||
cfg.minValue = 0;
|
|
||||||
cfg.maxValue = 1;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "rpcMaxTime";
|
|
||||||
cfg.ptr = &tsRpcMaxTime;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT;
|
|
||||||
cfg.minValue = 100;
|
|
||||||
cfg.maxValue = 7200;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_SECOND;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
|
|
||||||
cfg.option = "minSlidingTime";
|
cfg.option = "minSlidingTime";
|
||||||
cfg.ptr = &tsMinSlidingTime;
|
cfg.ptr = &tsMinSlidingTime;
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
||||||
|
|
|
@ -42,6 +42,8 @@ int tsRpcMaxRetry;
|
||||||
int tsRpcHeadSize;
|
int tsRpcHeadSize;
|
||||||
int tsRpcOverhead;
|
int tsRpcOverhead;
|
||||||
|
|
||||||
|
int32_t tsRpcForceTcp = 1; // disable this, means query, show command use udp protocol as default
|
||||||
|
|
||||||
SHashObj *tsFqdnHash;
|
SHashObj *tsFqdnHash;
|
||||||
|
|
||||||
#ifndef USE_UV
|
#ifndef USE_UV
|
||||||
|
@ -143,6 +145,10 @@ typedef struct SRpcConn {
|
||||||
|
|
||||||
static int tsRpcRefId = -1;
|
static int tsRpcRefId = -1;
|
||||||
static int32_t tsRpcNum = 0;
|
static int32_t tsRpcNum = 0;
|
||||||
|
|
||||||
|
int32_t tsRpcTimer = 300;
|
||||||
|
int32_t tsRpcMaxTime = 600; // seconds;
|
||||||
|
|
||||||
// static pthread_once_t tsRpcInit = PTHREAD_ONCE_INIT;
|
// static pthread_once_t tsRpcInit = PTHREAD_ONCE_INIT;
|
||||||
|
|
||||||
// server:0 client:1 tcp:2 udp:0
|
// server:0 client:1 tcp:2 udp:0
|
||||||
|
|
Loading…
Reference in New Issue