fix: load wal ref when init

This commit is contained in:
Liu Jicong 2023-01-03 16:45:45 +08:00
parent d33bcc9977
commit 9e71a58675
1 changed files with 11 additions and 0 deletions

View File

@ -61,6 +61,17 @@ int32_t tqOffsetRestoreFromFile(STqOffsetStore* pStore, const char* fname) {
ASSERT(0); ASSERT(0);
// TODO // TODO
} }
if (offset.val.type == TMQ_OFFSET__LOG) {
STqHandle* pHandle = taosHashGet(pStore->pTq->pHandle, offset.subKey, strlen(offset.subKey));
if (pHandle) {
if (walRefVer(pHandle->pRef, offset.val.version) < 0) {
tqError("vgId: %d, tq handle %s ref ver %" PRId64 "error", pStore->pTq->pVnode->config.vgId,
pHandle->subKey, offset.val.version);
}
}
}
taosMemoryFree(memBuf); taosMemoryFree(memBuf);
} }