Merge branch '3.0' into fix/xiaolei/centos7-cannot-write-taosdservice-in-system-after-install
This commit is contained in:
commit
888c3d2c4e
|
@ -149,7 +149,7 @@ DLL_EXPORT TAOS *taos_connect(const char *ip, const char *user, const char
|
||||||
DLL_EXPORT TAOS *taos_connect_auth(const char *ip, const char *user, const char *auth, const char *db, uint16_t port);
|
DLL_EXPORT TAOS *taos_connect_auth(const char *ip, const char *user, const char *auth, const char *db, uint16_t port);
|
||||||
DLL_EXPORT void taos_close(TAOS *taos);
|
DLL_EXPORT void taos_close(TAOS *taos);
|
||||||
|
|
||||||
const char *taos_data_type(int type);
|
DLL_EXPORT const char *taos_data_type(int type);
|
||||||
|
|
||||||
DLL_EXPORT TAOS_STMT *taos_stmt_init(TAOS *taos);
|
DLL_EXPORT TAOS_STMT *taos_stmt_init(TAOS *taos);
|
||||||
DLL_EXPORT TAOS_STMT *taos_stmt_init_with_reqid(TAOS *taos, int64_t reqid);
|
DLL_EXPORT TAOS_STMT *taos_stmt_init_with_reqid(TAOS *taos, int64_t reqid);
|
||||||
|
|
|
@ -149,9 +149,13 @@ void mndRestoreFinish(const SSyncFSM *pFsm) {
|
||||||
SMnode *pMnode = pFsm->data;
|
SMnode *pMnode = pFsm->data;
|
||||||
|
|
||||||
if (!pMnode->deploy) {
|
if (!pMnode->deploy) {
|
||||||
mInfo("vgId:1, sync restore finished, and will handle outstanding transactions");
|
if (!pMnode->restored) {
|
||||||
mndTransPullup(pMnode);
|
mInfo("vgId:1, sync restore finished, and will handle outstanding transactions");
|
||||||
mndSetRestored(pMnode, true);
|
mndTransPullup(pMnode);
|
||||||
|
mndSetRestored(pMnode, true);
|
||||||
|
} else {
|
||||||
|
mInfo("vgId:1, sync restore finished, repeat call");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mInfo("vgId:1, sync restore finished");
|
mInfo("vgId:1, sync restore finished");
|
||||||
}
|
}
|
||||||
|
|
|
@ -3129,7 +3129,7 @@ bool hasBeenDropped(const SArray* pDelList, int32_t* index, TSDBKEY* pKey, int32
|
||||||
return false;
|
return false;
|
||||||
} else if (pKey->ts == last->ts) {
|
} else if (pKey->ts == last->ts) {
|
||||||
TSDBKEY* prev = taosArrayGet(pDelList, num - 2);
|
TSDBKEY* prev = taosArrayGet(pDelList, num - 2);
|
||||||
return (prev->version >= pKey->version);
|
return (prev->version >= pKey->version && prev->version <= pVerRange->maxVer && prev->version >= pVerRange->minVer);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
TSDBKEY* pCurrent = taosArrayGet(pDelList, *index);
|
TSDBKEY* pCurrent = taosArrayGet(pDelList, *index);
|
||||||
|
|
|
@ -1839,7 +1839,8 @@ void syncNodeBecomeLeader(SSyncNode* pSyncNode, const char* debugStr) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// close receiver
|
// close receiver
|
||||||
if (snapshotReceiverIsStart(pSyncNode->pNewNodeReceiver)) {
|
if (pSyncNode != NULL && pSyncNode->pNewNodeReceiver != NULL &&
|
||||||
|
snapshotReceiverIsStart(pSyncNode->pNewNodeReceiver)) {
|
||||||
snapshotReceiverForceStop(pSyncNode->pNewNodeReceiver);
|
snapshotReceiverForceStop(pSyncNode->pNewNodeReceiver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1493,18 +1493,35 @@ FORCE_INLINE bool cliTryExtractEpSet(STransMsg* pResp, SEpSet* dst) {
|
||||||
bool cliResetEpset(STransConnCtx* pCtx, STransMsg* pResp, bool hasEpSet) {
|
bool cliResetEpset(STransConnCtx* pCtx, STransMsg* pResp, bool hasEpSet) {
|
||||||
bool noDelay = true;
|
bool noDelay = true;
|
||||||
if (hasEpSet == false) {
|
if (hasEpSet == false) {
|
||||||
// assert(pResp->contLen == 0);
|
|
||||||
if (pResp->contLen == 0) {
|
if (pResp->contLen == 0) {
|
||||||
if (pCtx->epsetRetryCnt >= pCtx->epSet.numOfEps) {
|
if (pCtx->epsetRetryCnt >= pCtx->epSet.numOfEps) {
|
||||||
noDelay = false;
|
noDelay = false;
|
||||||
} else {
|
} else {
|
||||||
EPSET_FORWARD_INUSE(&pCtx->epSet);
|
EPSET_FORWARD_INUSE(&pCtx->epSet);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (pResp->contLen != 0) {
|
||||||
if (pCtx->epsetRetryCnt >= pCtx->epSet.numOfEps) {
|
SEpSet epSet;
|
||||||
noDelay = false;
|
int32_t valid = tDeserializeSEpSet(pResp->pCont, pResp->contLen, &epSet);
|
||||||
|
if (valid < 0) {
|
||||||
|
tDebug("get invalid epset, epset equal, continue");
|
||||||
|
if (pCtx->epsetRetryCnt >= pCtx->epSet.numOfEps) {
|
||||||
|
noDelay = false;
|
||||||
|
} else {
|
||||||
|
EPSET_FORWARD_INUSE(&pCtx->epSet);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
EPSET_FORWARD_INUSE(&pCtx->epSet);
|
if (!transEpSetIsEqual(&pCtx->epSet, &epSet)) {
|
||||||
|
tDebug("epset not equal, retry new epset");
|
||||||
|
pCtx->epSet = epSet;
|
||||||
|
noDelay = false;
|
||||||
|
} else {
|
||||||
|
if (pCtx->epsetRetryCnt >= pCtx->epSet.numOfEps) {
|
||||||
|
noDelay = false;
|
||||||
|
} else {
|
||||||
|
tDebug("epset equal, continue");
|
||||||
|
EPSET_FORWARD_INUSE(&pCtx->epSet);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1584,7 +1601,7 @@ bool cliGenRetryRule(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) {
|
||||||
addConnToPool(pThrd->pool, pConn);
|
addConnToPool(pThrd->pool, pConn);
|
||||||
} else if (code == TSDB_CODE_SYN_RESTORING) {
|
} else if (code == TSDB_CODE_SYN_RESTORING) {
|
||||||
tTrace("code str %s, contlen:%d 0", tstrerror(code), pResp->contLen);
|
tTrace("code str %s, contlen:%d 0", tstrerror(code), pResp->contLen);
|
||||||
noDelay = cliResetEpset(pCtx, pResp, false);
|
noDelay = cliResetEpset(pCtx, pResp, true);
|
||||||
addConnToPool(pThrd->pool, pConn);
|
addConnToPool(pThrd->pool, pConn);
|
||||||
transFreeMsg(pResp->pCont);
|
transFreeMsg(pResp->pCont);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue