diff --git a/source/client/inc/clientInt.h b/source/client/inc/clientInt.h index ef19fb7c51..fe3e55092c 100644 --- a/source/client/inc/clientInt.h +++ b/source/client/inc/clientInt.h @@ -430,7 +430,7 @@ int32_t clientParseSqlImpl(void* param, const char* dbName, const char* sql, boo void clusterSlowQueryMonitorInit(const char* clusterKey); void clusterSlowQueryLog(const char* clusterKey, int32_t cost); -void SlowQueryLog(int64_t connId, int32_t cost); +void SlowQueryLog(int64_t rid, int32_t cost); void clusterSelectMonitorInit(const char* clusterKey); void clusterSelectLog(const char* clusterKey); diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c index 26b076e5ee..8c6292976f 100644 --- a/source/client/src/clientEnv.c +++ b/source/client/src/clientEnv.c @@ -114,7 +114,7 @@ static void deregisterRequest(SRequestObj *pRequest) { taosPrintSlowLog("PID:%d, Conn:%u, QID:0x%" PRIx64 ", Start:%" PRId64 ", Duration:%" PRId64 "us, SQL:%s", taosGetPId(), pTscObj->connId, pRequest->requestId, pRequest->metric.start, duration, pRequest->sqlstr); - SlowQueryLog(pTscObj->connId, duration); + SlowQueryLog(pTscObj->id, duration); } } diff --git a/source/client/src/selectMonitor.c b/source/client/src/selectMonitor.c index 0cb2073961..c1cab23188 100644 --- a/source/client/src/selectMonitor.c +++ b/source/client/src/selectMonitor.c @@ -33,14 +33,14 @@ void clusterSelectLog(const char* clusterKey) { taosClusterCounterInc(clusterKey, selectMonitorName, selectMonitorLabelValues); } -void selectLog(int64_t connId) { - STscObj* pTscObj = acquireTscObj(connId); +void selectLog(int64_t rid) { + STscObj* pTscObj = acquireTscObj(rid); if (pTscObj != NULL) { if(pTscObj->pAppInfo == NULL) { tscLog("selectLog, not found pAppInfo"); } return clusterSelectLog(pTscObj->pAppInfo->instKey); } else { - tscLog("selectLog, not found connect ID"); + tscLog("selectLog, not found rid"); } } diff --git a/source/client/src/slowQueryMonitor.c b/source/client/src/slowQueryMonitor.c index 7d25cf87ca..420b66a954 100644 --- a/source/client/src/slowQueryMonitor.c +++ b/source/client/src/slowQueryMonitor.c @@ -59,15 +59,15 @@ void clusterSlowQueryLog(const char* clusterKey, int32_t cost) { taosClusterCounterInc(clusterKey, slowQueryName, slowQueryLabelValues); } -void SlowQueryLog(int64_t connId, int32_t cost) { +void SlowQueryLog(int64_t rid, int32_t cost) { if (!enableSlowQueryMonitor) return; - STscObj* pTscObj = acquireTscObj(connId); + STscObj* pTscObj = acquireTscObj(rid); if (pTscObj != NULL) { if(pTscObj->pAppInfo == NULL) { tscLog("SlowQueryLog, not found pAppInfo"); } return clusterSlowQueryLog(pTscObj->pAppInfo->instKey, cost); } else { - tscLog("SlowQueryLog, not found connect ID"); + tscLog("SlowQueryLog, not found rid"); } } diff --git a/source/client/test/clientMonitorTests.cpp b/source/client/test/clientMonitorTests.cpp index 8882e268e7..5272a2ab3a 100644 --- a/source/client/test/clientMonitorTests.cpp +++ b/source/client/test/clientMonitorTests.cpp @@ -68,11 +68,11 @@ TEST(clientMonitorTest, sendTest) { ASSERT_TRUE(taos != NULL); printf("connect taosd sucessfully.\n"); - int64_t connId = *(int64_t *)taos; - SlowQueryLog(connId, 1000); + int64_t rid = *(int64_t *)taos; + SlowQueryLog(rid, 1000); int i = 0; while (i < 20) { - SlowQueryLog(connId, i * 1000); + SlowQueryLog(rid, i * 1000); taosMsleep(10); ++i; }