Merge pull request #29046 from taosdata/fix/skip-trim-during-restore
fix/skip-trim-during-restore
This commit is contained in:
commit
83c0d38d5c
|
@ -977,6 +977,11 @@ void vnodeUpdateMetaRsp(SVnode *pVnode, STableMetaRsp *pMetaRsp) {
|
||||||
extern int32_t vnodeAsyncRetention(SVnode *pVnode, int64_t now);
|
extern int32_t vnodeAsyncRetention(SVnode *pVnode, int64_t now);
|
||||||
|
|
||||||
static int32_t vnodeProcessTrimReq(SVnode *pVnode, int64_t ver, void *pReq, int32_t len, SRpcMsg *pRsp) {
|
static int32_t vnodeProcessTrimReq(SVnode *pVnode, int64_t ver, void *pReq, int32_t len, SRpcMsg *pRsp) {
|
||||||
|
if (!pVnode->restored) {
|
||||||
|
vInfo("vgId:%d, ignore trim req during restoring. ver:%" PRId64, TD_VID(pVnode), ver);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
SVTrimDbReq trimReq = {0};
|
SVTrimDbReq trimReq = {0};
|
||||||
|
|
||||||
|
|
|
@ -1464,7 +1464,7 @@ int32_t syncNodeRestore(SSyncNode* pSyncNode) {
|
||||||
|
|
||||||
// if (endIndex != lastVer + 1) return TSDB_CODE_SYN_INTERNAL_ERROR;
|
// if (endIndex != lastVer + 1) return TSDB_CODE_SYN_INTERNAL_ERROR;
|
||||||
pSyncNode->commitIndex = TMAX(pSyncNode->commitIndex, commitIndex);
|
pSyncNode->commitIndex = TMAX(pSyncNode->commitIndex, commitIndex);
|
||||||
sInfo("vgId:%d, restore sync until commitIndex:%" PRId64, pSyncNode->vgId, pSyncNode->commitIndex);
|
sInfo("vgId:%d, restore began, and keep syncing until commitIndex:%" PRId64, pSyncNode->vgId, pSyncNode->commitIndex);
|
||||||
|
|
||||||
if (pSyncNode->fsmState != SYNC_FSM_STATE_INCOMPLETE &&
|
if (pSyncNode->fsmState != SYNC_FSM_STATE_INCOMPLETE &&
|
||||||
(code = syncLogBufferCommit(pSyncNode->pLogBuf, pSyncNode, pSyncNode->commitIndex)) < 0) {
|
(code = syncLogBufferCommit(pSyncNode->pLogBuf, pSyncNode, pSyncNode->commitIndex)) < 0) {
|
||||||
|
|
Loading…
Reference in New Issue