invalid cfg msg while drop vnode
This commit is contained in:
parent
af97e55890
commit
7f29f0c6d6
|
@ -135,7 +135,8 @@ typedef struct SVgObj {
|
||||||
char dbName[TSDB_ACCT_LEN + TSDB_DB_NAME_LEN];
|
char dbName[TSDB_ACCT_LEN + TSDB_DB_NAME_LEN];
|
||||||
int8_t inUse;
|
int8_t inUse;
|
||||||
int8_t accessState;
|
int8_t accessState;
|
||||||
int8_t reserved0[5];
|
int8_t status;
|
||||||
|
int8_t reserved0[4];
|
||||||
SVnodeGid vnodeGid[TSDB_MAX_REPLICA];
|
SVnodeGid vnodeGid[TSDB_MAX_REPLICA];
|
||||||
int8_t reserved1[7];
|
int8_t reserved1[7];
|
||||||
int8_t updateEnd[1];
|
int8_t updateEnd[1];
|
||||||
|
|
|
@ -367,7 +367,6 @@ static int32_t mnodeProcessDnodeStatusMsg(SMnodeMsg *pMsg) {
|
||||||
pAccess++;
|
pAccess++;
|
||||||
mnodeDecVgroupRef(pVgroup);
|
mnodeDecVgroupRef(pVgroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pDnode->status == TAOS_DN_STATUS_OFFLINE) {
|
if (pDnode->status == TAOS_DN_STATUS_OFFLINE) {
|
||||||
|
|
|
@ -38,6 +38,11 @@
|
||||||
#include "mnodeVgroup.h"
|
#include "mnodeVgroup.h"
|
||||||
#include "mnodePeer.h"
|
#include "mnodePeer.h"
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
TAOS_VG_STATUS_READY,
|
||||||
|
TAOS_VG_STATUS_DROPPING
|
||||||
|
} EVgroupStatus;
|
||||||
|
|
||||||
static void *tsVgroupSdb = NULL;
|
static void *tsVgroupSdb = NULL;
|
||||||
static int32_t tsVgUpdateSize = 0;
|
static int32_t tsVgUpdateSize = 0;
|
||||||
|
|
||||||
|
@ -279,7 +284,7 @@ void mnodeCheckUnCreatedVgroup(SDnodeObj *pDnode, SVnodeLoad *pVloads, int32_t o
|
||||||
pNextV++;
|
pNextV++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == openVnodes) {
|
if (i == openVnodes && pVgroup->status != TAOS_VG_STATUS_READY) {
|
||||||
mnodeSendCreateVgroupMsg(pVgroup, NULL);
|
mnodeSendCreateVgroupMsg(pVgroup, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -728,6 +733,7 @@ void mnodeSendDropVnodeMsg(int32_t vgId, SRpcIpSet *ipSet, void *ahandle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mnodeSendDropVgroupMsg(SVgObj *pVgroup, void *ahandle) {
|
static void mnodeSendDropVgroupMsg(SVgObj *pVgroup, void *ahandle) {
|
||||||
|
pVgroup->status = TAOS_VG_STATUS_DROPPING; // deleting
|
||||||
mDebug("vgId:%d, send drop all vnodes msg, ahandle:%p", pVgroup->vgId, ahandle);
|
mDebug("vgId:%d, send drop all vnodes msg, ahandle:%p", pVgroup->vgId, ahandle);
|
||||||
for (int32_t i = 0; i < pVgroup->numOfVnodes; ++i) {
|
for (int32_t i = 0; i < pVgroup->numOfVnodes; ++i) {
|
||||||
SRpcIpSet ipSet = mnodeGetIpSetFromIp(pVgroup->vnodeGid[i].pDnode->dnodeEp);
|
SRpcIpSet ipSet = mnodeGetIpSetFromIp(pVgroup->vnodeGid[i].pDnode->dnodeEp);
|
||||||
|
|
Loading…
Reference in New Issue