This commit is contained in:
Hongze Cheng 2021-11-16 15:49:05 +08:00
parent b099da1529
commit 078e13b3aa
1 changed files with 17 additions and 2 deletions

View File

@ -110,6 +110,20 @@ static int vnodeOpenImpl(SVnode *pVnode) {
}
// TODO: Open TQ
sprintf(dir, "%s/wal", pVnode->path);
pVnode->pTq = tqOpen(dir, NULL /* TODO */);
if (pVnode->pTq == NULL) {
// TODO: handle error
return -1;
}
// Open WAL
sprintf(dir, "%s/wal", pVnode->path);
pVnode->pWal = walOpen(dir, NULL /* TODO */);
if (pVnode->pWal == NULL) {
// TODO: handle error
return -1;
}
// TODO
return 0;
@ -117,8 +131,9 @@ static int vnodeOpenImpl(SVnode *pVnode) {
static void vnodeCloseImpl(SVnode *pVnode) {
if (pVnode) {
vnodeCloseAllocatorPool(pVnode);
// TODO: Close TQ
vnodeCloseBufPool(pVnode);
walClose(pVnode->pWal);
tqClose(pVnode->pTq);
tsdbClose(pVnode->pTsdb);
metaClose(pVnode->pMeta);
}