[tbase-1147]
This commit is contained in:
parent
3313155271
commit
7a4bbc5c23
|
@ -320,11 +320,19 @@ int tscSendMsgToServer(SSqlObj *pSql) {
|
||||||
|
|
||||||
char *pStart = taosBuildReqHeader(pSql->thandle, pSql->cmd.msgType, buf);
|
char *pStart = taosBuildReqHeader(pSql->thandle, pSql->cmd.msgType, buf);
|
||||||
if (pStart) {
|
if (pStart) {
|
||||||
|
/*
|
||||||
|
* this SQL object may be released by other thread due to the completion of this query even before the log
|
||||||
|
* is dumped to log file. So the signature needs to be kept in a local variable.
|
||||||
|
*/
|
||||||
|
uint64_t signature = (uint64_t) pSql->signature;
|
||||||
if (tscUpdateVnodeMsg[pSql->cmd.command]) (*tscUpdateVnodeMsg[pSql->cmd.command])(pSql, buf);
|
if (tscUpdateVnodeMsg[pSql->cmd.command]) (*tscUpdateVnodeMsg[pSql->cmd.command])(pSql, buf);
|
||||||
int ret = taosSendMsgToPeerH(pSql->thandle, pStart, pSql->cmd.payloadLen, pSql);
|
|
||||||
|
|
||||||
if (ret >= 0) code = 0;
|
int ret = taosSendMsgToPeerH(pSql->thandle, pStart, pSql->cmd.payloadLen, pSql);
|
||||||
tscTrace("%p send msg ret:%d code:%d sig:%p", pSql, ret, code, pSql->signature);
|
if (ret >= 0) {
|
||||||
|
code = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
tscTrace("%p send msg ret:%d code:%d sig:%p", pSql, ret, code, signature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue