提交 c5d3440b 编写于 作者: C Cary Xu

other: code optimization

上级 d65b7551
...@@ -2664,7 +2664,7 @@ typedef struct { ...@@ -2664,7 +2664,7 @@ typedef struct {
} SVgEpSet; } SVgEpSet;
typedef struct { typedef struct {
// padding int32_t padding;
} SRSmaExecMsg; } SRSmaExecMsg;
typedef struct { typedef struct {
......
...@@ -118,17 +118,19 @@ struct SSmaStat { ...@@ -118,17 +118,19 @@ struct SSmaStat {
#define RSMA_FS_LOCK(r) (&(r)->lock) #define RSMA_FS_LOCK(r) (&(r)->lock)
struct SRSmaInfoItem { struct SRSmaInfoItem {
int8_t level; int8_t level;
int8_t triggerStat; int8_t triggerStat;
int32_t maxDelay; uint16_t interval; // second
tmr_h tmrId; int32_t maxDelay;
tmr_h tmrId;
}; };
struct SRSmaInfo { struct SRSmaInfo {
STSchema *pTSchema; STSchema *pTSchema;
int64_t suid; int64_t suid;
int64_t refId; // refId of SRSmaStat int64_t refId; // refId of SRSmaStat
int8_t delFlag; uint64_t delFlag : 1;
uint64_t lastReceived : 63; // second
T_REF_DECLARE() T_REF_DECLARE()
SRSmaInfoItem items[TSDB_RETENTION_L2]; SRSmaInfoItem items[TSDB_RETENTION_L2];
void *taskInfo[TSDB_RETENTION_L2]; // qTaskInfo_t void *taskInfo[TSDB_RETENTION_L2]; // qTaskInfo_t
......
...@@ -220,8 +220,6 @@ int vnodeCommit(SVnode *pVnode) { ...@@ -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, vInfo("vgId:%d, start to commit, commit ID:%" PRId64 " version:%" PRId64, TD_VID(pVnode), pVnode->state.commitID,
pVnode->state.applied); pVnode->state.applied);
pVnode->state.commitTerm = pVnode->state.applyTerm;
// preCommit // preCommit
// smaSyncPreCommit(pVnode->pSma); // smaSyncPreCommit(pVnode->pSma);
smaAsyncPreCommit(pVnode->pSma); smaAsyncPreCommit(pVnode->pSma);
...@@ -229,6 +227,8 @@ int vnodeCommit(SVnode *pVnode) { ...@@ -229,6 +227,8 @@ int vnodeCommit(SVnode *pVnode) {
vnodeBufPoolUnRef(pVnode->inUse); vnodeBufPoolUnRef(pVnode->inUse);
pVnode->inUse = NULL; pVnode->inUse = NULL;
pVnode->state.commitTerm = pVnode->state.applyTerm;
// save info // save info
info.config = pVnode->config; info.config = pVnode->config;
info.state.committed = pVnode->state.applied; info.state.committed = pVnode->state.applied;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册