other: code optimization
This commit is contained in:
parent
d65b75514a
commit
c5d3440b84
|
@ -2664,7 +2664,7 @@ typedef struct {
|
||||||
} SVgEpSet;
|
} SVgEpSet;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
// padding
|
int32_t padding;
|
||||||
} SRSmaExecMsg;
|
} SRSmaExecMsg;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -120,6 +120,7 @@ struct SSmaStat {
|
||||||
struct SRSmaInfoItem {
|
struct SRSmaInfoItem {
|
||||||
int8_t level;
|
int8_t level;
|
||||||
int8_t triggerStat;
|
int8_t triggerStat;
|
||||||
|
uint16_t interval; // second
|
||||||
int32_t maxDelay;
|
int32_t maxDelay;
|
||||||
tmr_h tmrId;
|
tmr_h tmrId;
|
||||||
};
|
};
|
||||||
|
@ -128,7 +129,8 @@ 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) {
|
||||||
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) {
|
||||||
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;
|
||||||
|
|
Loading…
Reference in New Issue