make tdb work with meta

This commit is contained in:
Hongze Cheng 2022-04-06 02:06:59 +00:00
parent 906b615c9a
commit 317d4ff2eb
2 changed files with 7 additions and 21 deletions

View File

@ -1,21 +0,0 @@
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "meta.h"
int metaCommit(SMeta *pMeta) {
// TODO
return 0;
}

View File

@ -167,6 +167,8 @@ int metaOpenDB(SMeta *pMeta) {
return -1;
}
tdbBegin(pMetaDb->pEnv, NULL);
pMeta->pDB = pMetaDb;
return 0;
}
@ -701,3 +703,8 @@ static void *metaDecodeTbInfo(void *buf, STbCfg *pTbCfg) {
}
return buf;
}
int metaCommit(SMeta *pMeta) {
tdbCommit(pMeta->pDB->pEnv, NULL);
return 0;
}