enh: rsma checkpoint
This commit is contained in:
parent
a48968e5e8
commit
c95fc014a8
|
@ -155,7 +155,7 @@ struct SRSmaInfo {
|
|||
int64_t lastRecv; // ms
|
||||
int8_t assigned; // 0 idle, 1 assgined for exec
|
||||
int8_t delFlag;
|
||||
int8_t padding;
|
||||
int16_t padding;
|
||||
T_REF_DECLARE()
|
||||
SRSmaInfoItem items[TSDB_RETENTION_L2];
|
||||
void *taskInfo[TSDB_RETENTION_L2]; // qTaskInfo_t
|
||||
|
|
|
@ -22,7 +22,7 @@ static int32_t rsmaRestore(SSma *pSma);
|
|||
|
||||
#define SMA_SET_KEEP_CFG(v, l) \
|
||||
do { \
|
||||
SRetention *r = &(pCfg->retentions[l]); \
|
||||
SRetention *r = &pCfg->retentions[l]; \
|
||||
pKeepCfg->keep2 = convertTimeFromPrecisionToUnit(r->keep, pCfg->precision, TIME_UNIT_MINUTE); \
|
||||
pKeepCfg->keep0 = pKeepCfg->keep2; \
|
||||
pKeepCfg->keep1 = pKeepCfg->keep2; \
|
||||
|
|
|
@ -291,9 +291,6 @@ static int32_t vnodePrepareCommit(SVnode *pVnode, SCommitInfo *pInfo) {
|
|||
|
||||
if(syncNodeGetConfig(pVnode->sync, &pVnode->config.syncCfg) != 0) goto _exit;
|
||||
|
||||
code = smaPrepareAsyncCommit(pVnode->pSma); // prepare checkpointId and save to vnode.json
|
||||
if (code) goto _exit;
|
||||
|
||||
pVnode->state.commitTerm = pVnode->state.applyTerm;
|
||||
|
||||
pInfo->info.config = pVnode->config;
|
||||
|
@ -316,6 +313,9 @@ static int32_t vnodePrepareCommit(SVnode *pVnode, SCommitInfo *pInfo) {
|
|||
|
||||
metaPrepareAsyncCommit(pVnode->pMeta);
|
||||
|
||||
code = smaPrepareAsyncCommit(pVnode->pSma);
|
||||
if (code) goto _exit;
|
||||
|
||||
taosThreadMutexLock(&pVnode->mutex);
|
||||
ASSERT(pVnode->onCommit == NULL);
|
||||
pVnode->onCommit = pVnode->inUse;
|
||||
|
|
Loading…
Reference in New Issue