other: code optimization
This commit is contained in:
parent
d65b75514a
commit
c5d3440b84
|
@ -2664,7 +2664,7 @@ typedef struct {
|
|||
} SVgEpSet;
|
||||
|
||||
typedef struct {
|
||||
// padding
|
||||
int32_t padding;
|
||||
} SRSmaExecMsg;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue