提交 19bf81a4 编写于 作者: A Alex Duan

fix(query): proble msg add to pSQL

上级 7d2d19d6
......@@ -312,7 +312,7 @@ bool dealConnBroken(SSqlObj * pSql) {
bool sendProbeConnMsg(SSqlObj* pSql) {
// TEST TODO DELETE
tsProbeSeconds = 1; // over this value send probe msg
tsProbeKillSeconds = 3*60; // over this value query can be killed
tsProbeKillSeconds = 2*60; // over this value query can be killed
if(pSql->stime == 0) {
// not start , no need probe
......@@ -329,7 +329,7 @@ bool sendProbeConnMsg(SSqlObj* pSql) {
if (diff > tsProbeKillSeconds * 1000) {
// need kill query
tscDebug("PROBE 0x%"PRIx64" need killed, noAckCnt:%d diff=%d", pSql->self, pSql->noAckCnt, diff);
//return false;
return false;
}
if (pSql->pPrevContext == NULL || pSql->pPrevConn == NULL || pSql->pPrevFdObj == NULL || pSql->prevFd <= 0) {
......
......@@ -6367,6 +6367,10 @@ static SSDataBlock* doProjectOperation(void* param, bool* newgroup) {
SSDataBlock* pBlock = pOperator->upstream[0]->exec(pOperator->upstream[0], newgroup);
publishOperatorProfEvent(pOperator->upstream[0], QUERY_PROF_AFTER_OPERATOR_EXEC);
// TEST TODU DELETE
taosMsleep(10*1000);
if (pBlock == NULL) {
//assert(*newgroup == false);
......
......@@ -1102,7 +1102,7 @@ static void rpcProcessProbeMsg(SRecvInfo *pRecv, SRpcConn *pConn) {
bool ret = rpcSendMsgToPeer(pConn, &rspHead, sizeof(SRpcHead));
tDebug("PROBE 0x%" PRIx64 " recv probe msg and response. ret=%d", pHead->ahandle, ret);
rpcFreeCont(pRecv->msg);
rpcFreeMsg(pRecv->msg);
rpcUnlockConn(pConn);
} else if (pHead->msgType == TSDB_MSG_TYPE_PROBE_CONN_RSP) {
if(pConn) {
......@@ -1786,6 +1786,7 @@ bool doRpcSendProbe(SRpcConn *pConn) {
// send server syn
bool rpcSendProbe(int64_t rpcRid, void* pPrevContext, void* pPrevConn, void* pPrevFdObj, int32_t prevFd) {
// return false can kill query
bool ret = false;
if(rpcRid < 0) {
tError("PROBE rpcRid=%" PRId64 " less than zero, invalid.", rpcRid);
......@@ -1795,8 +1796,8 @@ bool rpcSendProbe(int64_t rpcRid, void* pPrevContext, void* pPrevConn, void* pPr
// get req content
SRpcReqContext *pContext = taosAcquireRef(tsRpcRefId, rpcRid);
if (pContext == NULL) {
tError("PROBE rpcRid=%" PRId64 " get context NULL.", rpcRid);
return false;
tError("PROBE rpcRid=%" PRId64 " get context NULL. sql finished no need send probe.", rpcRid);
return true;
}
// context same
......@@ -1808,6 +1809,7 @@ bool rpcSendProbe(int64_t rpcRid, void* pPrevContext, void* pPrevConn, void* pPr
// conn same
if (pContext->pConn != pPrevConn) {
tError("PROBE rpcRid=%" PRId64 " connect obj diff. pContext->pConn=%p pPreConn=%p", rpcRid, pContext->pConn, pPrevConn);
ret = pContext->pConn == NULL;
goto _END;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册