提交 baac49c7 编写于 作者: H Hongze Cheng

more

上级 6010516f
......@@ -45,7 +45,7 @@ SVnode *vnodeOpen(const char *path, const SVnodeOptions *pVnodeOptions);
/**
* @brief Close a VNODE
*
* @param pVnode The vnode object
* @param pVnode The vnode object to close
*/
void vnodeClose(SVnode *pVnode);
......
......@@ -25,6 +25,7 @@ extern "C" {
typedef struct SMemAllocator SMemAllocator;
struct SMemAllocator {
char name[16];
void *impl;
void *(*malloc)(SMemAllocator *, uint64_t size);
void *(*calloc)(SMemAllocator *, uint64_t nmemb, uint64_t size);
......
......@@ -87,6 +87,11 @@ static void vnodeFree(SVnode *pVnode) {
static int vnodeOpenImpl(SVnode *pVnode) {
char dir[TSDB_FILENAME_LEN];
if (vnodeOpenBufPool(pVnode) < 0) {
// TODO: handle error
return -1;
}
// Open meta
sprintf(dir, "%s/meta", pVnode->path);
pVnode->pMeta = metaOpen(dir, &(pVnode->options.metaOptions));
......@@ -111,7 +116,7 @@ static int vnodeOpenImpl(SVnode *pVnode) {
static void vnodeCloseImpl(SVnode *pVnode) {
if (pVnode) {
// TODO: Close TQ
vnodeCloseBufPool(pVnode);
tsdbClose(pVnode->pTsdb);
metaClose(pVnode->pMeta);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册