commit
a56e677fda
|
@ -27,7 +27,7 @@ void vnodeCleanupRead(void);
|
||||||
int32_t vnodeWriteToRQueue(void *pVnode, void *pCont, int32_t contLen, int8_t qtype, void *rparam);
|
int32_t vnodeWriteToRQueue(void *pVnode, void *pCont, int32_t contLen, int8_t qtype, void *rparam);
|
||||||
void vnodeFreeFromRQueue(void *pVnode, SVReadMsg *pRead);
|
void vnodeFreeFromRQueue(void *pVnode, SVReadMsg *pRead);
|
||||||
int32_t vnodeProcessRead(void *pVnode, SVReadMsg *pRead);
|
int32_t vnodeProcessRead(void *pVnode, SVReadMsg *pRead);
|
||||||
void vnodeWaitReadCompleted(void *pVnode);
|
void vnodeWaitReadCompleted(SVnodeObj *pVnode);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ void vnodeCleanupWrite(void);
|
||||||
int32_t vnodeWriteToWQueue(void *pVnode, void *pHead, int32_t qtype, void *pRpcMsg);
|
int32_t vnodeWriteToWQueue(void *pVnode, void *pHead, int32_t qtype, void *pRpcMsg);
|
||||||
void vnodeFreeFromWQueue(void *pVnode, SVWriteMsg *pWrite);
|
void vnodeFreeFromWQueue(void *pVnode, SVWriteMsg *pWrite);
|
||||||
int32_t vnodeProcessWrite(void *pVnode, void *pHead, int32_t qtype, void *pRspRet);
|
int32_t vnodeProcessWrite(void *pVnode, void *pHead, int32_t qtype, void *pRspRet);
|
||||||
void vnodeWaitWriteCompleted(void *pVnode);
|
void vnodeWaitWriteCompleted(SVnodeObj *pVnode);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -436,4 +436,9 @@ int32_t vnodeNotifyCurrentQhandle(void *handle, void *qhandle, int32_t vgId) {
|
||||||
return rpcReportProgress(handle, (char *)pMsg, sizeof(SRetrieveTableMsg));
|
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 "taosmsg.h"
|
||||||
#include "query.h"
|
#include "query.h"
|
||||||
#include "vnodeStatus.h"
|
#include "vnodeStatus.h"
|
||||||
|
#include "vnodeRead.h"
|
||||||
|
#include "vnodeWrite.h"
|
||||||
|
|
||||||
char* vnodeStatus[] = {
|
char* vnodeStatus[] = {
|
||||||
"init",
|
"init",
|
||||||
|
@ -77,6 +79,8 @@ bool vnodeSetClosingStatus(SVnodeObj* pVnode) {
|
||||||
|
|
||||||
// release local resources only after cutting off outside connections
|
// release local resources only after cutting off outside connections
|
||||||
qQueryMgmtNotifyClosed(pVnode->qMgmt);
|
qQueryMgmtNotifyClosed(pVnode->qMgmt);
|
||||||
|
vnodeWaitReadCompleted(pVnode);
|
||||||
|
vnodeWaitWriteCompleted(pVnode);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -121,6 +125,8 @@ bool vnodeSetResetStatus(SVnodeObj* pVnode) {
|
||||||
|
|
||||||
// release local resources only after cutting off outside connections
|
// release local resources only after cutting off outside connections
|
||||||
qQueryMgmtNotifyClosed(pVnode->qMgmt);
|
qQueryMgmtNotifyClosed(pVnode->qMgmt);
|
||||||
|
vnodeWaitReadCompleted(pVnode);
|
||||||
|
vnodeWaitWriteCompleted(pVnode);
|
||||||
|
|
||||||
return true;
|
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