split sync/status channel
This commit is contained in:
parent
423fa76207
commit
5e1a7c694b
|
@ -109,12 +109,12 @@ extern const int32_t TYPE_BYTES[21];
|
||||||
#define TSDB_INS_USER_STABLES_DBNAME_COLID 2
|
#define TSDB_INS_USER_STABLES_DBNAME_COLID 2
|
||||||
|
|
||||||
static const int64_t TICK_PER_SECOND[] = {
|
static const int64_t TICK_PER_SECOND[] = {
|
||||||
1000LL, // MILLISECOND
|
1000LL, // MILLISECOND
|
||||||
1000000LL, // MICROSECOND
|
1000000LL, // MICROSECOND
|
||||||
1000000000LL, // NANOSECOND
|
1000000000LL, // NANOSECOND
|
||||||
0LL, // HOUR
|
0LL, // HOUR
|
||||||
0LL, // MINUTE
|
0LL, // MINUTE
|
||||||
1LL // SECOND
|
1LL // SECOND
|
||||||
};
|
};
|
||||||
|
|
||||||
#define TSDB_TICK_PER_SECOND(precision) \
|
#define TSDB_TICK_PER_SECOND(precision) \
|
||||||
|
@ -239,8 +239,8 @@ typedef enum ELogicConditionType {
|
||||||
#define TSDB_MAX_SQL_SHOW_LEN 1024
|
#define TSDB_MAX_SQL_SHOW_LEN 1024
|
||||||
#define TSDB_MAX_ALLOWED_SQL_LEN (1 * 1024 * 1024u) // sql length should be less than 1mb
|
#define TSDB_MAX_ALLOWED_SQL_LEN (1 * 1024 * 1024u) // sql length should be less than 1mb
|
||||||
|
|
||||||
#define TSDB_VIEW_NAME_LEN 193
|
#define TSDB_VIEW_NAME_LEN 193
|
||||||
#define TSDB_VIEW_FNAME_LEN (TSDB_DB_FNAME_LEN + TSDB_VIEW_NAME_LEN + TSDB_NAME_DELIMITER_LEN)
|
#define TSDB_VIEW_FNAME_LEN (TSDB_DB_FNAME_LEN + TSDB_VIEW_NAME_LEN + TSDB_NAME_DELIMITER_LEN)
|
||||||
|
|
||||||
#define TSDB_APP_NAME_LEN TSDB_UNI_LEN
|
#define TSDB_APP_NAME_LEN TSDB_UNI_LEN
|
||||||
#define TSDB_TB_COMMENT_LEN 1025
|
#define TSDB_TB_COMMENT_LEN 1025
|
||||||
|
@ -260,7 +260,7 @@ typedef enum ELogicConditionType {
|
||||||
#define TSDB_PASSWORD_LEN 32
|
#define TSDB_PASSWORD_LEN 32
|
||||||
#define TSDB_USET_PASSWORD_LEN 129
|
#define TSDB_USET_PASSWORD_LEN 129
|
||||||
#define TSDB_VERSION_LEN 32
|
#define TSDB_VERSION_LEN 32
|
||||||
#define TSDB_LABEL_LEN 12
|
#define TSDB_LABEL_LEN 16
|
||||||
#define TSDB_JOB_STATUS_LEN 32
|
#define TSDB_JOB_STATUS_LEN 32
|
||||||
|
|
||||||
#define TSDB_CLUSTER_ID_LEN 40
|
#define TSDB_CLUSTER_ID_LEN 40
|
||||||
|
@ -288,7 +288,7 @@ typedef enum ELogicConditionType {
|
||||||
#define TSDB_ACTIVE_KEY_LEN 109
|
#define TSDB_ACTIVE_KEY_LEN 109
|
||||||
#define TSDB_CONN_ACTIVE_KEY_LEN 255
|
#define TSDB_CONN_ACTIVE_KEY_LEN 255
|
||||||
|
|
||||||
#define TSDB_DEFAULT_PKT_SIZE 65480 // same as RPC_MAX_UDP_SIZE
|
#define TSDB_DEFAULT_PKT_SIZE 65480 // same as RPC_MAX_UDP_SIZE
|
||||||
#define TSDB_SNAP_DATA_PAYLOAD_SIZE (1 * 1024 * 1024)
|
#define TSDB_SNAP_DATA_PAYLOAD_SIZE (1 * 1024 * 1024)
|
||||||
|
|
||||||
#define TSDB_PAYLOAD_SIZE TSDB_DEFAULT_PKT_SIZE
|
#define TSDB_PAYLOAD_SIZE TSDB_DEFAULT_PKT_SIZE
|
||||||
|
@ -397,13 +397,13 @@ typedef enum ELogicConditionType {
|
||||||
#define TSDB_MAX_STT_TRIGGER 1
|
#define TSDB_MAX_STT_TRIGGER 1
|
||||||
#define TSDB_DEFAULT_SST_TRIGGER 1
|
#define TSDB_DEFAULT_SST_TRIGGER 1
|
||||||
#endif
|
#endif
|
||||||
#define TSDB_STT_TRIGGER_ARRAY_SIZE 16 // maximum of TSDB_MAX_STT_TRIGGER of TD_ENTERPRISE and TD_COMMUNITY
|
#define TSDB_STT_TRIGGER_ARRAY_SIZE 16 // maximum of TSDB_MAX_STT_TRIGGER of TD_ENTERPRISE and TD_COMMUNITY
|
||||||
#define TSDB_MIN_HASH_PREFIX (2 - TSDB_TABLE_NAME_LEN)
|
#define TSDB_MIN_HASH_PREFIX (2 - TSDB_TABLE_NAME_LEN)
|
||||||
#define TSDB_MAX_HASH_PREFIX (TSDB_TABLE_NAME_LEN - 2)
|
#define TSDB_MAX_HASH_PREFIX (TSDB_TABLE_NAME_LEN - 2)
|
||||||
#define TSDB_DEFAULT_HASH_PREFIX 0
|
#define TSDB_DEFAULT_HASH_PREFIX 0
|
||||||
#define TSDB_MIN_HASH_SUFFIX (2 - TSDB_TABLE_NAME_LEN)
|
#define TSDB_MIN_HASH_SUFFIX (2 - TSDB_TABLE_NAME_LEN)
|
||||||
#define TSDB_MAX_HASH_SUFFIX (TSDB_TABLE_NAME_LEN - 2)
|
#define TSDB_MAX_HASH_SUFFIX (TSDB_TABLE_NAME_LEN - 2)
|
||||||
#define TSDB_DEFAULT_HASH_SUFFIX 0
|
#define TSDB_DEFAULT_HASH_SUFFIX 0
|
||||||
|
|
||||||
#define TSDB_DB_MIN_WAL_RETENTION_PERIOD -1
|
#define TSDB_DB_MIN_WAL_RETENTION_PERIOD -1
|
||||||
#define TSDB_REP_DEF_DB_WAL_RET_PERIOD 3600
|
#define TSDB_REP_DEF_DB_WAL_RET_PERIOD 3600
|
||||||
|
|
|
@ -363,7 +363,7 @@ int32_t dmInitClient(SDnode *pDnode) {
|
||||||
SDnodeTrans *pTrans = &pDnode->trans;
|
SDnodeTrans *pTrans = &pDnode->trans;
|
||||||
|
|
||||||
SRpcInit rpcInit = {0};
|
SRpcInit rpcInit = {0};
|
||||||
rpcInit.label = "DND-C";
|
rpcInit.label = "DND-CLI";
|
||||||
rpcInit.numOfThreads = tsNumOfRpcThreads / 2;
|
rpcInit.numOfThreads = tsNumOfRpcThreads / 2;
|
||||||
rpcInit.cfp = (RpcCfp)dmProcessRpcMsg;
|
rpcInit.cfp = (RpcCfp)dmProcessRpcMsg;
|
||||||
rpcInit.sessions = 1024;
|
rpcInit.sessions = 1024;
|
||||||
|
@ -407,7 +407,7 @@ int32_t dmInitStatusClient(SDnode *pDnode) {
|
||||||
SDnodeTrans *pTrans = &pDnode->trans;
|
SDnodeTrans *pTrans = &pDnode->trans;
|
||||||
|
|
||||||
SRpcInit rpcInit = {0};
|
SRpcInit rpcInit = {0};
|
||||||
rpcInit.label = "DND-STATUS";
|
rpcInit.label = "DND-STATUS-CLI";
|
||||||
rpcInit.numOfThreads = 1;
|
rpcInit.numOfThreads = 1;
|
||||||
rpcInit.cfp = (RpcCfp)dmProcessRpcMsg;
|
rpcInit.cfp = (RpcCfp)dmProcessRpcMsg;
|
||||||
rpcInit.sessions = 1024;
|
rpcInit.sessions = 1024;
|
||||||
|
@ -452,7 +452,7 @@ int32_t dmInitSyncClient(SDnode *pDnode) {
|
||||||
SDnodeTrans *pTrans = &pDnode->trans;
|
SDnodeTrans *pTrans = &pDnode->trans;
|
||||||
|
|
||||||
SRpcInit rpcInit = {0};
|
SRpcInit rpcInit = {0};
|
||||||
rpcInit.label = "DND-SYNC";
|
rpcInit.label = "DND-SYNC-CLI";
|
||||||
rpcInit.numOfThreads = tsNumOfRpcThreads / 2;
|
rpcInit.numOfThreads = tsNumOfRpcThreads / 2;
|
||||||
rpcInit.cfp = (RpcCfp)dmProcessRpcMsg;
|
rpcInit.cfp = (RpcCfp)dmProcessRpcMsg;
|
||||||
rpcInit.sessions = 1024;
|
rpcInit.sessions = 1024;
|
||||||
|
|
|
@ -1907,7 +1907,12 @@ bool cliRecvReleaseReq(SCliConn* conn, STransMsgHead* pHead) {
|
||||||
static void* cliWorkThread(void* arg) {
|
static void* cliWorkThread(void* arg) {
|
||||||
SCliThrd* pThrd = (SCliThrd*)arg;
|
SCliThrd* pThrd = (SCliThrd*)arg;
|
||||||
pThrd->pid = taosGetSelfPthreadId();
|
pThrd->pid = taosGetSelfPthreadId();
|
||||||
setThreadName("trans-cli-work");
|
|
||||||
|
char threadName[TSDB_LABEL_LEN] = {0};
|
||||||
|
STrans* pInst = pThrd->pTransInst;
|
||||||
|
strntolower(threadName, pInst->label, sizeof(threadName));
|
||||||
|
setThreadName(threadName);
|
||||||
|
|
||||||
uv_run(pThrd->loop, UV_RUN_DEFAULT);
|
uv_run(pThrd->loop, UV_RUN_DEFAULT);
|
||||||
|
|
||||||
tDebug("thread quit-thread:%08" PRId64, pThrd->pid);
|
tDebug("thread quit-thread:%08" PRId64, pThrd->pid);
|
||||||
|
|
Loading…
Reference in New Issue