fix issue #552
This commit is contained in:
parent
67c646b10d
commit
806a9310e3
|
@ -181,7 +181,7 @@
|
|||
# sdbDebugFlag 135
|
||||
|
||||
# debug flag for RPC
|
||||
# taosDebugFlag 131
|
||||
# rpcDebugFlag 131
|
||||
|
||||
# debug flag for basic utils
|
||||
# debugFlag 131
|
||||
|
|
|
@ -3856,7 +3856,7 @@ int32_t validateDNodeConfig(tDCLSQL* pOptions) {
|
|||
}
|
||||
|
||||
SDNodeDynConfOption DNODE_DYNAMIC_CFG_OPTIONS[13] = {
|
||||
{"resetLog", 8}, {"resetQueryCache", 15}, {"dDebugFlag", 10}, {"taosDebugFlag", 13},
|
||||
{"resetLog", 8}, {"resetQueryCache", 15}, {"dDebugFlag", 10}, {"rpcDebugFlag", 12},
|
||||
{"tmrDebugFlag", 12}, {"cDebugFlag", 10}, {"uDebugFlag", 10}, {"mDebugFlag", 10},
|
||||
{"sdbDebugFlag", 12}, {"httpDebugFlag", 13}, {"monitorDebugFlag", 16}, {"qDebugflag", 10},
|
||||
{"debugFlag", 9}};
|
||||
|
|
|
@ -155,7 +155,7 @@ extern int sdbDebugFlag;
|
|||
extern int httpDebugFlag;
|
||||
extern int monitorDebugFlag;
|
||||
extern int uDebugFlag;
|
||||
extern int taosDebugFlag;
|
||||
extern int rpcDebugFlag;
|
||||
extern int debugFlag;
|
||||
extern int odbcdebugFlag;
|
||||
extern int qdebugFlag;
|
||||
|
|
|
@ -132,23 +132,23 @@ extern int cdebugFlag;
|
|||
{ tprintf("JNI ", 255, __VA_ARGS__); }
|
||||
|
||||
// rpc log function
|
||||
extern int taosDebugFlag;
|
||||
extern int rpcDebugFlag;
|
||||
#define tError(...) \
|
||||
if (taosDebugFlag & DEBUG_ERROR) { \
|
||||
tprintf("ERROR RPC ", taosDebugFlag, __VA_ARGS__); \
|
||||
if (rpcDebugFlag & DEBUG_ERROR) { \
|
||||
tprintf("ERROR RPC ", rpcDebugFlag, __VA_ARGS__); \
|
||||
}
|
||||
#define tWarn(...) \
|
||||
if (taosDebugFlag & DEBUG_WARN) { \
|
||||
tprintf("WARN RPC ", taosDebugFlag, __VA_ARGS__); \
|
||||
if (rpcDebugFlag & DEBUG_WARN) { \
|
||||
tprintf("WARN RPC ", rpcDebugFlag, __VA_ARGS__); \
|
||||
}
|
||||
#define tTrace(...) \
|
||||
if (taosDebugFlag & DEBUG_TRACE) { \
|
||||
tprintf("RPC ", taosDebugFlag, __VA_ARGS__); \
|
||||
if (rpcDebugFlag & DEBUG_TRACE) { \
|
||||
tprintf("RPC ", rpcDebugFlag, __VA_ARGS__); \
|
||||
}
|
||||
#define tPrint(...) \
|
||||
{ tprintf("RPC ", 255, __VA_ARGS__); }
|
||||
#define tDump(x, y) \
|
||||
if (taosDebugFlag & DEBUG_DUMP) { \
|
||||
if (rpcDebugFlag & DEBUG_DUMP) { \
|
||||
taosDumpData((unsigned char *)x, y); \
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ typedef struct {
|
|||
char * ckey; // ciphering key
|
||||
} SRpcConnInit;
|
||||
|
||||
extern int taosDebugFlag;
|
||||
extern int rpcDebugFlag;
|
||||
extern int tsRpcHeadSize;
|
||||
|
||||
void *taosOpenRpc(SRpcInit *pRpc);
|
||||
|
|
|
@ -116,7 +116,7 @@ typedef struct rpc_server {
|
|||
} STaosRpc;
|
||||
|
||||
// configurable
|
||||
int taosDebugFlag = 131;
|
||||
int rpcDebugFlag = 131;
|
||||
int tsRpcTimer = 300;
|
||||
int tsRpcMaxTime = 600; // seconds;
|
||||
int tsRpcProgressTime = 10; // milliseocnds
|
||||
|
@ -628,14 +628,14 @@ int taosSendDataToPeer(SRpcConn *pConn, char *data, int dataLen) {
|
|||
if (pConn->signature != pConn || pServer == NULL) return -1;
|
||||
|
||||
if (pHeader->msgType & 1) {
|
||||
if (pHeader->msgType < TSDB_MSG_TYPE_HEARTBEAT || (taosDebugFlag & 16))
|
||||
if (pHeader->msgType < TSDB_MSG_TYPE_HEARTBEAT || (rpcDebugFlag & 16))
|
||||
tTrace(
|
||||
"%s cid:%d sid:%d id:%s, %s is sent to %s:%hu, len:%d tranId:%d "
|
||||
"pConn:%p",
|
||||
pServer->label, pConn->chann, pConn->sid, pConn->meterId, taosMsg[pHeader->msgType], pConn->peerIpstr,
|
||||
pConn->peerPort, dataLen, pHeader->tranId, pConn);
|
||||
} else {
|
||||
if (pHeader->msgType < TSDB_MSG_TYPE_HEARTBEAT || (taosDebugFlag & 16))
|
||||
if (pHeader->msgType < TSDB_MSG_TYPE_HEARTBEAT || (rpcDebugFlag & 16))
|
||||
tTrace(
|
||||
"%s cid:%d sid:%d id:%s, %s is sent to %s:%hu, code:%u len:%d "
|
||||
"tranId:%d pConn:%p",
|
||||
|
@ -1050,7 +1050,7 @@ void *taosProcessDataFromPeer(char *data, int dataLen, uint32_t ip, short port,
|
|||
return pConn;
|
||||
}
|
||||
|
||||
if (pHeader->msgType < TSDB_MSG_TYPE_HEARTBEAT || (taosDebugFlag & 16)) {
|
||||
if (pHeader->msgType < TSDB_MSG_TYPE_HEARTBEAT || (rpcDebugFlag & 16)) {
|
||||
tTrace("%s cid:%d sid:%d id:%s, %s received from 0x%x:%hu, parse code:%u, first:%u len:%d tranId:%d pConn:%p",
|
||||
pServer->label, chann, sid, pHeader->meterId, taosMsg[pHeader->msgType], ip, port, code, pHeader->content[0],
|
||||
dataLen, pHeader->tranId, pConn);
|
||||
|
@ -1084,7 +1084,7 @@ void *taosProcessDataFromPeer(char *data, int dataLen, uint32_t ip, short port,
|
|||
// memcpy(schedMsg.msg, (char *)(&(pHeader->destId)), pHeader->msgLen);
|
||||
}
|
||||
|
||||
if (pHeader->msgType < TSDB_MSG_TYPE_HEARTBEAT || (taosDebugFlag & 16)) {
|
||||
if (pHeader->msgType < TSDB_MSG_TYPE_HEARTBEAT || (rpcDebugFlag & 16)) {
|
||||
tTrace("%s cid:%d sid:%d id:%s, %s is put into queue, msgLen:%d pConn:%p pTimer:%p",
|
||||
pServer->label, chann, sid, pHeader->meterId, taosMsg[pHeader->msgType], pHeader->msgLen, pConn,
|
||||
pConn->pTimer);
|
||||
|
|
|
@ -556,7 +556,7 @@ void tsInitGlobalConfig() {
|
|||
TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG, 0, 255, 0, TSDB_CFG_UTYPE_NONE);
|
||||
tsInitConfigOption(cfg++, "sdbDebugFlag", &sdbDebugFlag, TSDB_CFG_VTYPE_INT,
|
||||
TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG, 0, 255, 0, TSDB_CFG_UTYPE_NONE);
|
||||
tsInitConfigOption(cfg++, "taosDebugFlag", &taosDebugFlag, TSDB_CFG_VTYPE_INT,
|
||||
tsInitConfigOption(cfg++, "rpcDebugFlag", &rpcDebugFlag, TSDB_CFG_VTYPE_INT,
|
||||
TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT, 0, 255, 0,
|
||||
TSDB_CFG_UTYPE_NONE);
|
||||
tsInitConfigOption(cfg++, "tmrDebugFlag", &tmrDebugFlag, TSDB_CFG_VTYPE_INT,
|
||||
|
@ -821,7 +821,7 @@ void tsSetAllDebugFlag() {
|
|||
if (mdebugFlag != debugFlag) mdebugFlag = debugFlag;
|
||||
if (ddebugFlag != debugFlag) ddebugFlag = debugFlag;
|
||||
if (sdbDebugFlag != debugFlag) sdbDebugFlag = debugFlag;
|
||||
if (taosDebugFlag != debugFlag) taosDebugFlag = debugFlag;
|
||||
if (rpcDebugFlag != debugFlag) rpcDebugFlag = debugFlag;
|
||||
if (cdebugFlag != debugFlag) cdebugFlag = debugFlag;
|
||||
if (jnidebugFlag != debugFlag) jnidebugFlag = debugFlag;
|
||||
if (uDebugFlag != debugFlag) uDebugFlag = debugFlag;
|
||||
|
|
Loading…
Reference in New Issue