diff --git a/include/common/tmsg.h b/include/common/tmsg.h index cedbdb6087..f870bd161f 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -2664,7 +2664,7 @@ typedef struct { } SVgEpSet; typedef struct { - // padding + int32_t padding; } SRSmaExecMsg; typedef struct { diff --git a/source/dnode/vnode/src/inc/sma.h b/source/dnode/vnode/src/inc/sma.h index 26adc8d5e5..c43772062e 100644 --- a/source/dnode/vnode/src/inc/sma.h +++ b/source/dnode/vnode/src/inc/sma.h @@ -118,17 +118,19 @@ struct SSmaStat { #define RSMA_FS_LOCK(r) (&(r)->lock) struct SRSmaInfoItem { - int8_t level; - int8_t triggerStat; - int32_t maxDelay; - tmr_h tmrId; + int8_t level; + int8_t triggerStat; + uint16_t interval; // second + int32_t maxDelay; + tmr_h tmrId; }; struct SRSmaInfo { STSchema *pTSchema; int64_t suid; int64_t refId; // refId of SRSmaStat - int8_t delFlag; + uint64_t delFlag : 1; + uint64_t lastReceived : 63; // second T_REF_DECLARE() SRSmaInfoItem items[TSDB_RETENTION_L2]; void *taskInfo[TSDB_RETENTION_L2]; // qTaskInfo_t diff --git a/source/dnode/vnode/src/vnd/vnodeCommit.c b/source/dnode/vnode/src/vnd/vnodeCommit.c index fc09eaac44..89542baa25 100644 --- a/source/dnode/vnode/src/vnd/vnodeCommit.c +++ b/source/dnode/vnode/src/vnd/vnodeCommit.c @@ -220,8 +220,6 @@ int vnodeCommit(SVnode *pVnode) { vInfo("vgId:%d, start to commit, commit ID:%" PRId64 " version:%" PRId64, TD_VID(pVnode), pVnode->state.commitID, pVnode->state.applied); - pVnode->state.commitTerm = pVnode->state.applyTerm; - // preCommit // smaSyncPreCommit(pVnode->pSma); smaAsyncPreCommit(pVnode->pSma); @@ -229,6 +227,8 @@ int vnodeCommit(SVnode *pVnode) { vnodeBufPoolUnRef(pVnode->inUse); pVnode->inUse = NULL; + pVnode->state.commitTerm = pVnode->state.applyTerm; + // save info info.config = pVnode->config; info.state.committed = pVnode->state.applied;