Merge pull request #5468 from taosdata/fix/TD-3332
[TD-3332]<fix>: vnode report status if not closing instead of not ready
This commit is contained in:
commit
1af62a9dc0
|
@ -128,7 +128,7 @@ static void vnodeBuildVloadMsg(SVnodeObj *pVnode, SStatusMsg *pStatus) {
|
|||
int64_t compStorage = 0;
|
||||
int64_t pointsWritten = 0;
|
||||
|
||||
if (!vnodeInReadyStatus(pVnode)) return;
|
||||
if (vnodeInClosingStatus(pVnode)) return;
|
||||
if (pStatus->openVnodes >= TSDB_MAX_VNODES) return;
|
||||
|
||||
if (pVnode->tsdb) {
|
||||
|
@ -194,4 +194,4 @@ void vnodeSetAccess(SVgroupAccess *pAccess, int32_t numOfVnodes) {
|
|||
vnodeRelease(pVnode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -153,6 +153,18 @@ bool vnodeInReadyOrUpdatingStatus(SVnodeObj* pVnode) {
|
|||
return in;
|
||||
}
|
||||
|
||||
bool vnodeInClosingStatus(SVnodeObj* pVnode) {
|
||||
bool in = false;
|
||||
pthread_mutex_lock(&pVnode->statusMutex);
|
||||
|
||||
if (pVnode->status == TAOS_VN_STATUS_CLOSING) {
|
||||
in = true;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&pVnode->statusMutex);
|
||||
return in;
|
||||
}
|
||||
|
||||
bool vnodeInResetStatus(SVnodeObj* pVnode) {
|
||||
bool in = false;
|
||||
pthread_mutex_lock(&pVnode->statusMutex);
|
||||
|
|
Loading…
Reference in New Issue