confirm forward from slave
This commit is contained in:
parent
e01c22a58a
commit
de1d615f7a
|
@ -247,6 +247,11 @@ static void *dnodeProcessWriteQueue(void *param) {
|
||||||
if (type == TAOS_QTYPE_RPC) {
|
if (type == TAOS_QTYPE_RPC) {
|
||||||
pWrite = (SWriteMsg *)item;
|
pWrite = (SWriteMsg *)item;
|
||||||
dnodeSendRpcVnodeWriteRsp(pVnode, item, pWrite->rpcMsg.code);
|
dnodeSendRpcVnodeWriteRsp(pVnode, item, pWrite->rpcMsg.code);
|
||||||
|
} else if (type == TAOS_QTYPE_FWD) {
|
||||||
|
pHead = (SWalHead *)item;
|
||||||
|
vnodeConfirmForward(pVnode, pHead->version, 0);
|
||||||
|
taosFreeQitem(item);
|
||||||
|
vnodeRelease(pVnode);
|
||||||
} else {
|
} else {
|
||||||
taosFreeQitem(item);
|
taosFreeQitem(item);
|
||||||
vnodeRelease(pVnode);
|
vnodeRelease(pVnode);
|
||||||
|
|
|
@ -60,6 +60,7 @@ void* vnodeGetWal(void *pVnode);
|
||||||
int32_t vnodeProcessWrite(void *pVnode, int qtype, void *pHead, void *item);
|
int32_t vnodeProcessWrite(void *pVnode, int qtype, void *pHead, void *item);
|
||||||
int32_t vnodeGetVnodeList(int32_t vnodeList[], int32_t *numOfVnodes);
|
int32_t vnodeGetVnodeList(int32_t vnodeList[], int32_t *numOfVnodes);
|
||||||
void vnodeBuildStatusMsg(void *param);
|
void vnodeBuildStatusMsg(void *param);
|
||||||
|
void vnodeConfirmForward(void *param, uint64_t version, int32_t code);
|
||||||
void vnodeSetAccess(SDMVgroupAccess *pAccess, int32_t numOfVnodes);
|
void vnodeSetAccess(SDMVgroupAccess *pAccess, int32_t numOfVnodes);
|
||||||
void vnodeCleanupResources();
|
void vnodeCleanupResources();
|
||||||
|
|
||||||
|
|
|
@ -779,7 +779,8 @@ static int32_t vnodeReadCfg(SVnodeObj *pVnode) {
|
||||||
vError("vgId: %d, failed to read vnode cfg, quorum not found", pVnode->vgId);
|
vError("vgId: %d, failed to read vnode cfg, quorum not found", pVnode->vgId);
|
||||||
goto PARSE_OVER;
|
goto PARSE_OVER;
|
||||||
}
|
}
|
||||||
pVnode->syncCfg.quorum = (int8_t)quorum->valueint;
|
//pVnode->syncCfg.quorum = (int8_t)quorum->valueint;
|
||||||
|
pVnode->syncCfg.quorum = 2;
|
||||||
|
|
||||||
cJSON *nodeInfos = cJSON_GetObjectItem(root, "nodeInfos");
|
cJSON *nodeInfos = cJSON_GetObjectItem(root, "nodeInfos");
|
||||||
if (!nodeInfos || nodeInfos->type != cJSON_Array) {
|
if (!nodeInfos || nodeInfos->type != cJSON_Array) {
|
||||||
|
|
|
@ -89,6 +89,11 @@ int32_t vnodeProcessWrite(void *param1, int qtype, void *param2, void *item) {
|
||||||
return syncCode;
|
return syncCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void vnodeConfirmForward(void *param, uint64_t version, int32_t code) {
|
||||||
|
SVnodeObj *pVnode = (SVnodeObj *)param;
|
||||||
|
syncConfirmForward(pVnode->sync, version, code);
|
||||||
|
}
|
||||||
|
|
||||||
static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pRet) {
|
static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pRet) {
|
||||||
int32_t code = TSDB_CODE_SUCCESS;
|
int32_t code = TSDB_CODE_SUCCESS;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue