Merge branch 'develop' into xiaoping/add_test_case
This commit is contained in:
commit
69cbb1d5ce
|
@ -95,7 +95,7 @@ void taos_query_a(TAOS *taos, const char *sqlstr, __async_cb_func_t fp, void *pa
|
|||
return;
|
||||
}
|
||||
|
||||
nPrintTsc(sqlstr);
|
||||
nPrintTsc("%s", sqlstr);
|
||||
|
||||
SSqlObj *pSql = (SSqlObj *)calloc(1, sizeof(SSqlObj));
|
||||
if (pSql == NULL) {
|
||||
|
|
|
@ -327,7 +327,7 @@ TAOS_RES* taos_query_c(TAOS *taos, const char *sqlstr, uint32_t sqlLen, int64_t*
|
|||
return NULL;
|
||||
}
|
||||
|
||||
nPrintTsc(sqlstr);
|
||||
nPrintTsc("%s", sqlstr);
|
||||
|
||||
SSqlObj* pSql = calloc(1, sizeof(SSqlObj));
|
||||
if (pSql == NULL) {
|
||||
|
|
|
@ -181,7 +181,7 @@ void httpProcessMultiSql(HttpContext *pContext) {
|
|||
char *sql = httpGetCmdsString(pContext, cmd->sql);
|
||||
httpTraceL("context:%p, fd:%d, user:%s, process pos:%d, start query, sql:%s", pContext, pContext->fd, pContext->user,
|
||||
multiCmds->pos, sql);
|
||||
nPrintHttp(sql);
|
||||
nPrintHttp("%s", sql);
|
||||
taos_query_a(pContext->session->taos, sql, httpProcessMultiSqlCallBack, (void *)pContext);
|
||||
}
|
||||
|
||||
|
@ -329,7 +329,7 @@ void httpProcessSingleSqlCmd(HttpContext *pContext) {
|
|||
}
|
||||
|
||||
httpTraceL("context:%p, fd:%d, user:%s, start query, sql:%s", pContext, pContext->fd, pContext->user, sql);
|
||||
nPrintHttp(sql);
|
||||
nPrintHttp("%s", sql);
|
||||
taos_query_a(pSession->taos, sql, httpProcessSingleSqlCallBack, (void *)pContext);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ void vnodeCleanupRead(void);
|
|||
int32_t vnodeWriteToRQueue(void *pVnode, void *pCont, int32_t contLen, int8_t qtype, void *rparam);
|
||||
void vnodeFreeFromRQueue(void *pVnode, SVReadMsg *pRead);
|
||||
int32_t vnodeProcessRead(void *pVnode, SVReadMsg *pRead);
|
||||
void vnodeWaitReadCompleted(void *pVnode);
|
||||
void vnodeWaitReadCompleted(SVnodeObj *pVnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ void vnodeCleanupWrite(void);
|
|||
int32_t vnodeWriteToWQueue(void *pVnode, void *pHead, int32_t qtype, void *pRpcMsg);
|
||||
void vnodeFreeFromWQueue(void *pVnode, SVWriteMsg *pWrite);
|
||||
int32_t vnodeProcessWrite(void *pVnode, void *pHead, int32_t qtype, void *pRspRet);
|
||||
void vnodeWaitWriteCompleted(void *pVnode);
|
||||
void vnodeWaitWriteCompleted(SVnodeObj *pVnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -420,9 +420,6 @@ void vnodeCleanUp(SVnodeObj *pVnode) {
|
|||
|
||||
vnodeSetClosingStatus(pVnode);
|
||||
|
||||
// release local resources only after cutting off outside connections
|
||||
qQueryMgmtNotifyClosed(pVnode->qMgmt);
|
||||
|
||||
// stop replication module
|
||||
if (pVnode->sync > 0) {
|
||||
int64_t sync = pVnode->sync;
|
||||
|
|
|
@ -436,4 +436,9 @@ int32_t vnodeNotifyCurrentQhandle(void *handle, void *qhandle, int32_t vgId) {
|
|||
return rpcReportProgress(handle, (char *)pMsg, sizeof(SRetrieveTableMsg));
|
||||
}
|
||||
|
||||
void vnodeWaitReadCompleted(void *pVnode) {}
|
||||
void vnodeWaitReadCompleted(SVnodeObj *pVnode) {
|
||||
while (pVnode->queuedRMsg > 0) {
|
||||
vTrace("vgId:%d, queued rmsg num:%d", pVnode->vgId, pVnode->queuedRMsg);
|
||||
taosMsleep(10);
|
||||
}
|
||||
}
|
|
@ -18,6 +18,8 @@
|
|||
#include "taosmsg.h"
|
||||
#include "query.h"
|
||||
#include "vnodeStatus.h"
|
||||
#include "vnodeRead.h"
|
||||
#include "vnodeWrite.h"
|
||||
|
||||
char* vnodeStatus[] = {
|
||||
"init",
|
||||
|
@ -75,6 +77,11 @@ bool vnodeSetClosingStatus(SVnodeObj* pVnode) {
|
|||
}
|
||||
}
|
||||
|
||||
// release local resources only after cutting off outside connections
|
||||
qQueryMgmtNotifyClosed(pVnode->qMgmt);
|
||||
vnodeWaitReadCompleted(pVnode);
|
||||
vnodeWaitWriteCompleted(pVnode);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -116,6 +123,11 @@ bool vnodeSetResetStatus(SVnodeObj* pVnode) {
|
|||
}
|
||||
}
|
||||
|
||||
// release local resources only after cutting off outside connections
|
||||
qQueryMgmtNotifyClosed(pVnode->qMgmt);
|
||||
vnodeWaitReadCompleted(pVnode);
|
||||
vnodeWaitWriteCompleted(pVnode);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -345,4 +345,9 @@ static int32_t vnodePerformFlowCtrl(SVWriteMsg *pWrite) {
|
|||
}
|
||||
}
|
||||
|
||||
void vnodeWaitWriteCompleted(void *pVnode) {}
|
||||
void vnodeWaitWriteCompleted(SVnodeObj *pVnode) {
|
||||
while (pVnode->queuedWMsg > 0) {
|
||||
vTrace("vgId:%d, queued wmsg num:%d", pVnode->vgId, pVnode->queuedWMsg);
|
||||
taosMsleep(10);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue