[td-225] update the thread name
This commit is contained in:
parent
74f0030fc9
commit
7409fda3a2
|
@ -23,7 +23,7 @@
|
||||||
static SBnThread tsBnThread;
|
static SBnThread tsBnThread;
|
||||||
|
|
||||||
static void *bnThreadFunc(void *arg) {
|
static void *bnThreadFunc(void *arg) {
|
||||||
setThreadName("bnThreadd");
|
setThreadName("balance");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
pthread_mutex_lock(&tsBnThread.mutex);
|
pthread_mutex_lock(&tsBnThread.mutex);
|
||||||
|
|
|
@ -245,7 +245,7 @@ static void* telemetryThread(void* param) {
|
||||||
clock_gettime(CLOCK_REALTIME, &end);
|
clock_gettime(CLOCK_REALTIME, &end);
|
||||||
end.tv_sec += 300; // wait 5 minutes before send first report
|
end.tv_sec += 300; // wait 5 minutes before send first report
|
||||||
|
|
||||||
setThreadName("telemetryThrd");
|
setThreadName("telemetry");
|
||||||
|
|
||||||
while (!tsExit) {
|
while (!tsExit) {
|
||||||
int r = 0;
|
int r = 0;
|
||||||
|
|
|
@ -118,10 +118,11 @@ static void *dnodeProcessReadQueue(void *wparam) {
|
||||||
SVReadMsg * pRead;
|
SVReadMsg * pRead;
|
||||||
int32_t qtype;
|
int32_t qtype;
|
||||||
void * pVnode;
|
void * pVnode;
|
||||||
char name[16];
|
|
||||||
|
|
||||||
memset(name, 0, 16);
|
char* threadname = strcmp(pPool->name, "vquery") == 0? "dnodeQueryQ":"dnodeFetchQ";
|
||||||
snprintf(name, 16, "%s-dnReadQ", pPool->name);
|
|
||||||
|
char name[16] = {0};
|
||||||
|
snprintf(name, tListLen(name), "%s", threadname);
|
||||||
setThreadName(name);
|
setThreadName(name);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
|
@ -90,7 +90,6 @@ static void *dnodeOpenVnode(void *param) {
|
||||||
char stepDesc[TSDB_STEP_DESC_LEN] = {0};
|
char stepDesc[TSDB_STEP_DESC_LEN] = {0};
|
||||||
|
|
||||||
dDebug("thread:%d, start to open %d vnodes", pThread->threadIndex, pThread->vnodeNum);
|
dDebug("thread:%d, start to open %d vnodes", pThread->threadIndex, pThread->vnodeNum);
|
||||||
|
|
||||||
setThreadName("dnodeOpenVnode");
|
setThreadName("dnodeOpenVnode");
|
||||||
|
|
||||||
for (int32_t v = 0; v < pThread->vnodeNum; ++v) {
|
for (int32_t v = 0; v < pThread->vnodeNum; ++v) {
|
||||||
|
|
|
@ -114,7 +114,7 @@ int32_t monStartSystem() {
|
||||||
|
|
||||||
static void *monThreadFunc(void *param) {
|
static void *monThreadFunc(void *param) {
|
||||||
monDebug("starting to initialize monitor module ...");
|
monDebug("starting to initialize monitor module ...");
|
||||||
setThreadName("monThrd");
|
setThreadName("monitor");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
static int32_t accessTimes = 0;
|
static int32_t accessTimes = 0;
|
||||||
|
|
|
@ -6554,9 +6554,11 @@ static SSDataBlock* hashDistinct(void* param, bool* newgroup) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SDistinctOperatorInfo* pInfo = pOperator->info;
|
SDistinctOperatorInfo* pInfo = pOperator->info;
|
||||||
SSDataBlock* pRes = pInfo->pRes;
|
SSDataBlock* pRes = pInfo->pRes;
|
||||||
|
|
||||||
|
|
||||||
pRes->info.rows = 0;
|
pRes->info.rows = 0;
|
||||||
SSDataBlock* pBlock = NULL;
|
SSDataBlock* pBlock = NULL;
|
||||||
while(1) {
|
while(1) {
|
||||||
|
|
|
@ -529,10 +529,9 @@ static void *taosProcessTcpData(void *param) {
|
||||||
SFdObj *pFdObj;
|
SFdObj *pFdObj;
|
||||||
struct epoll_event events[maxEvents];
|
struct epoll_event events[maxEvents];
|
||||||
SRecvInfo recvInfo;
|
SRecvInfo recvInfo;
|
||||||
char name[16];
|
|
||||||
|
|
||||||
memset(name, 0, sizeof(name));
|
char name[16] = {0};
|
||||||
snprintf(name, 16, "%s-tcpData", pThreadObj->label);
|
snprintf(name, tListLen(name), "%s-tcp", pThreadObj->label);
|
||||||
setThreadName(name);
|
setThreadName(name);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
|
@ -48,8 +48,6 @@ static void *sendRequest(void *param) {
|
||||||
SInfo *pInfo = (SInfo *)param;
|
SInfo *pInfo = (SInfo *)param;
|
||||||
SRpcMsg rpcMsg = {0};
|
SRpcMsg rpcMsg = {0};
|
||||||
|
|
||||||
setThreadName("sendCliReq");
|
|
||||||
|
|
||||||
tDebug("thread:%d, start to send request", pInfo->index);
|
tDebug("thread:%d, start to send request", pInfo->index);
|
||||||
|
|
||||||
while ( pInfo->numOfReqs == 0 || pInfo->num < pInfo->numOfReqs) {
|
while ( pInfo->numOfReqs == 0 || pInfo->num < pInfo->numOfReqs) {
|
||||||
|
|
|
@ -41,8 +41,6 @@ static void *sendRequest(void *param) {
|
||||||
SInfo *pInfo = (SInfo *)param;
|
SInfo *pInfo = (SInfo *)param;
|
||||||
SRpcMsg rpcMsg, rspMsg;
|
SRpcMsg rpcMsg, rspMsg;
|
||||||
|
|
||||||
setThreadName("sendSrvReq");
|
|
||||||
|
|
||||||
tDebug("thread:%d, start to send request", pInfo->index);
|
tDebug("thread:%d, start to send request", pInfo->index);
|
||||||
|
|
||||||
while ( pInfo->numOfReqs == 0 || pInfo->num < pInfo->numOfReqs) {
|
while ( pInfo->numOfReqs == 0 || pInfo->num < pInfo->numOfReqs) {
|
||||||
|
|
|
@ -415,7 +415,6 @@ static int32_t syncRetrieveDataStepByStep(SSyncPeer *pPeer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void *syncRetrieveData(void *param) {
|
void *syncRetrieveData(void *param) {
|
||||||
setThreadName("syncRetrievData");
|
|
||||||
int64_t rid = (int64_t)param;
|
int64_t rid = (int64_t)param;
|
||||||
SSyncPeer *pPeer = syncAcquirePeer(rid);
|
SSyncPeer *pPeer = syncAcquirePeer(rid);
|
||||||
if (pPeer == NULL) {
|
if (pPeer == NULL) {
|
||||||
|
|
|
@ -48,8 +48,6 @@ void *sendRequest(void *param) {
|
||||||
SInfo * pInfo = (SInfo *)param;
|
SInfo * pInfo = (SInfo *)param;
|
||||||
SRpcMsg rpcMsg = {0};
|
SRpcMsg rpcMsg = {0};
|
||||||
|
|
||||||
setThreadName("sendCliReq");
|
|
||||||
|
|
||||||
uDebug("thread:%d, start to send request", pInfo->index);
|
uDebug("thread:%d, start to send request", pInfo->index);
|
||||||
|
|
||||||
while (pInfo->numOfReqs == 0 || pInfo->num < pInfo->numOfReqs) {
|
while (pInfo->numOfReqs == 0 || pInfo->num < pInfo->numOfReqs) {
|
||||||
|
|
|
@ -178,7 +178,7 @@ void *processWriteQueue(void *param) {
|
||||||
int type;
|
int type;
|
||||||
void *item;
|
void *item;
|
||||||
|
|
||||||
setThreadName("writeQ");
|
setThreadName("syncWrite");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int ret = taosReadQitem(qhandle, &type, &item);
|
int ret = taosReadQitem(qhandle, &type, &item);
|
||||||
|
|
|
@ -178,8 +178,6 @@ static void *taosThreadToOpenNewFile(void *param) {
|
||||||
char keepName[LOG_FILE_NAME_LEN + 20];
|
char keepName[LOG_FILE_NAME_LEN + 20];
|
||||||
sprintf(keepName, "%s.%d", tsLogObj.logName, tsLogObj.flag);
|
sprintf(keepName, "%s.%d", tsLogObj.logName, tsLogObj.flag);
|
||||||
|
|
||||||
setThreadName("openNewFile");
|
|
||||||
|
|
||||||
tsLogObj.flag ^= 1;
|
tsLogObj.flag ^= 1;
|
||||||
tsLogObj.lines = 0;
|
tsLogObj.lines = 0;
|
||||||
char name[LOG_FILE_NAME_LEN + 20];
|
char name[LOG_FILE_NAME_LEN + 20];
|
||||||
|
@ -689,12 +687,9 @@ static void taosWriteLog(SLogBuff *tLogBuff) {
|
||||||
|
|
||||||
static void *taosAsyncOutputLog(void *param) {
|
static void *taosAsyncOutputLog(void *param) {
|
||||||
SLogBuff *tLogBuff = (SLogBuff *)param;
|
SLogBuff *tLogBuff = (SLogBuff *)param;
|
||||||
|
setThreadName("log");
|
||||||
setThreadName("asyncOutputLog");
|
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
//tsem_wait(&(tLogBuff->buffNotEmpty));
|
|
||||||
|
|
||||||
taosMsleep(writeInterval);
|
taosMsleep(writeInterval);
|
||||||
|
|
||||||
// Polling the buffer
|
// Polling the buffer
|
||||||
|
|
|
@ -122,7 +122,9 @@ void *taosProcessSchedQueue(void *scheduler) {
|
||||||
SSchedQueue *pSched = (SSchedQueue *)scheduler;
|
SSchedQueue *pSched = (SSchedQueue *)scheduler;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
setThreadName("schedQ");
|
char name[16] = {0};
|
||||||
|
snprintf(name, tListLen(name), "%s-taskQ", pSched->label);
|
||||||
|
setThreadName(name);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if ((ret = tsem_wait(&pSched->fullSem)) != 0) {
|
if ((ret = tsem_wait(&pSched->fullSem)) != 0) {
|
||||||
|
|
|
@ -192,7 +192,7 @@ static void walFsyncAll() {
|
||||||
|
|
||||||
static void *walThreadFunc(void *param) {
|
static void *walThreadFunc(void *param) {
|
||||||
int stop = 0;
|
int stop = 0;
|
||||||
setThreadName("walThrd");
|
setThreadName("wal");
|
||||||
while (1) {
|
while (1) {
|
||||||
walUpdateSeq();
|
walUpdateSeq();
|
||||||
walFsyncAll();
|
walFsyncAll();
|
||||||
|
|
Loading…
Reference in New Issue