Merge pull request #17037 from taosdata/fix/TD-19220
fix: do not send ttl msg on taosd startup
This commit is contained in:
commit
c16f4ae3f7
|
@ -315,7 +315,7 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
mTrace("update cluster uptime to %" PRId64, clusterObj.upTime);
|
mInfo("update cluster uptime to %" PRId64, clusterObj.upTime);
|
||||||
STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "update-uptime");
|
STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "update-uptime");
|
||||||
if (pTrans == NULL) return -1;
|
if (pTrans == NULL) return -1;
|
||||||
|
|
||||||
|
|
|
@ -178,6 +178,8 @@ static int32_t mndProcessMqTimerMsg(SRpcMsg *pMsg) {
|
||||||
SMqConsumerObj *pConsumer;
|
SMqConsumerObj *pConsumer;
|
||||||
void *pIter = NULL;
|
void *pIter = NULL;
|
||||||
|
|
||||||
|
mTrace("start to process mq timer");
|
||||||
|
|
||||||
// rebalance cannot be parallel
|
// rebalance cannot be parallel
|
||||||
if (!mndRebTryStart()) {
|
if (!mndRebTryStart()) {
|
||||||
mInfo("mq rebalance already in progress, do nothing");
|
mInfo("mq rebalance already in progress, do nothing");
|
||||||
|
|
|
@ -119,28 +119,30 @@ static void *mndThreadFp(void *param) {
|
||||||
lastTime++;
|
lastTime++;
|
||||||
taosMsleep(100);
|
taosMsleep(100);
|
||||||
if (mndGetStop(pMnode)) break;
|
if (mndGetStop(pMnode)) break;
|
||||||
|
if (lastTime % 10 != 0) continue;
|
||||||
|
|
||||||
if (lastTime % (tsTtlPushInterval * 10) == 1) {
|
int64_t sec = lastTime / 10;
|
||||||
|
if (sec % tsTtlPushInterval == 0) {
|
||||||
mndPullupTtl(pMnode);
|
mndPullupTtl(pMnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastTime % (tsTransPullupInterval * 10) == 0) {
|
if (sec % tsTransPullupInterval == 0) {
|
||||||
mndPullupTrans(pMnode);
|
mndPullupTrans(pMnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastTime % (tsMqRebalanceInterval * 10) == 0) {
|
if (sec % tsMqRebalanceInterval == 0) {
|
||||||
mndCalMqRebalance(pMnode);
|
mndCalMqRebalance(pMnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastTime % (tsTelemInterval * 10) == ((tsTelemInterval - 1) * 10)) {
|
if (sec % tsTelemInterval == (TMIN(60, (tsTelemInterval - 1)))) {
|
||||||
mndPullupTelem(pMnode);
|
mndPullupTelem(pMnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastTime % (tsGrantHBInterval * 10) == 0) {
|
if (sec % tsGrantHBInterval == 0) {
|
||||||
mndPullupGrant(pMnode);
|
mndPullupGrant(pMnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((lastTime % (tsUptimeInterval * 10)) == ((tsUptimeInterval - 1) * 10)) {
|
if (sec % tsUptimeInterval == 0) {
|
||||||
mndIncreaseUpTime(pMnode);
|
mndIncreaseUpTime(pMnode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -399,7 +401,7 @@ void mndPreClose(SMnode *pMnode) {
|
||||||
atomic_store_8(&(pMnode->syncMgmt.leaderTransferFinish), 0);
|
atomic_store_8(&(pMnode->syncMgmt.leaderTransferFinish), 0);
|
||||||
syncLeaderTransfer(pMnode->syncMgmt.sync);
|
syncLeaderTransfer(pMnode->syncMgmt.sync);
|
||||||
|
|
||||||
/*
|
#if 0
|
||||||
mInfo("vgId:1, mnode start leader transfer");
|
mInfo("vgId:1, mnode start leader transfer");
|
||||||
// wait for leader transfer finish
|
// wait for leader transfer finish
|
||||||
while (!atomic_load_8(&(pMnode->syncMgmt.leaderTransferFinish))) {
|
while (!atomic_load_8(&(pMnode->syncMgmt.leaderTransferFinish))) {
|
||||||
|
@ -407,7 +409,7 @@ void mndPreClose(SMnode *pMnode) {
|
||||||
mInfo("vgId:1, mnode waiting for leader transfer");
|
mInfo("vgId:1, mnode waiting for leader transfer");
|
||||||
}
|
}
|
||||||
mInfo("vgId:1, mnode finish leader transfer");
|
mInfo("vgId:1, mnode finish leader transfer");
|
||||||
*/
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -834,6 +834,8 @@ static int32_t mndProcessTtlTimer(SRpcMsg *pReq) {
|
||||||
int32_t reqLen = tSerializeSVDropTtlTableReq(NULL, 0, &ttlReq);
|
int32_t reqLen = tSerializeSVDropTtlTableReq(NULL, 0, &ttlReq);
|
||||||
int32_t contLen = reqLen + sizeof(SMsgHead);
|
int32_t contLen = reqLen + sizeof(SMsgHead);
|
||||||
|
|
||||||
|
mInfo("start to process ttl timer");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
pIter = sdbFetch(pSdb, SDB_VGROUP, pIter, (void **)&pVgroup);
|
pIter = sdbFetch(pSdb, SDB_VGROUP, pIter, (void **)&pVgroup);
|
||||||
if (pIter == NULL) break;
|
if (pIter == NULL) break;
|
||||||
|
|
|
@ -133,7 +133,7 @@ static int32_t mndProcessTelemTimer(SRpcMsg* pReq) {
|
||||||
if (taosSendHttpReport(tsTelemServer, tsTelemPort, pCont, strlen(pCont), HTTP_FLAT) != 0) {
|
if (taosSendHttpReport(tsTelemServer, tsTelemPort, pCont, strlen(pCont), HTTP_FLAT) != 0) {
|
||||||
mError("failed to send telemetry report");
|
mError("failed to send telemetry report");
|
||||||
} else {
|
} else {
|
||||||
mTrace("succeed to send telemetry report");
|
mInfo("succeed to send telemetry report");
|
||||||
}
|
}
|
||||||
taosMemoryFree(pCont);
|
taosMemoryFree(pCont);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1478,6 +1478,7 @@ void mndTransExecute(SMnode *pMnode, STrans *pTrans) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t mndProcessTransTimer(SRpcMsg *pReq) {
|
static int32_t mndProcessTransTimer(SRpcMsg *pReq) {
|
||||||
|
mTrace("start to process trans timer");
|
||||||
mndTransPullup(pReq->info.node);
|
mndTransPullup(pReq->info.node);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -688,6 +688,8 @@ static void vnodeRestoreFinish(struct SSyncFSM *pFsm) {
|
||||||
}
|
}
|
||||||
} while (true);
|
} while (true);
|
||||||
|
|
||||||
|
walApplyVer(pVnode->pWal, pVnode->state.applied);
|
||||||
|
|
||||||
pVnode->restored = true;
|
pVnode->restored = true;
|
||||||
vDebug("vgId:%d, sync restore finished", pVnode->config.vgId);
|
vDebug("vgId:%d, sync restore finished", pVnode->config.vgId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,7 +201,7 @@ void *threadFunc(void *param) {
|
||||||
int64_t t = pInfo->tableBeginIndex;
|
int64_t t = pInfo->tableBeginIndex;
|
||||||
for (; t <= pInfo->tableEndIndex;) {
|
for (; t <= pInfo->tableEndIndex;) {
|
||||||
// int64_t batch = (pInfo->tableEndIndex - t);
|
// int64_t batch = (pInfo->tableEndIndex - t);
|
||||||
// batch = MIN(batch, batchNum);
|
// batch = TMIN(batch, batchNum);
|
||||||
|
|
||||||
int32_t len = sprintf(qstr, "create table");
|
int32_t len = sprintf(qstr, "create table");
|
||||||
for (int32_t i = 0; i < batchNumOfTbl;) {
|
for (int32_t i = 0; i < batchNumOfTbl;) {
|
||||||
|
|
Loading…
Reference in New Issue