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