diff --git a/source/server/vnode/meta/src/meta.c b/source/server/vnode/meta/src/meta.c index b3d33c7b87c700d791d569d2c48654777de973f0..000b2ca9b0544dafa6540ee9c2e87a637f0a5855 100644 --- a/source/server/vnode/meta/src/meta.c +++ b/source/server/vnode/meta/src/meta.c @@ -145,19 +145,20 @@ int metaCreateTable(SMeta *pMeta, STableOpts *pTableOpts) { taosHashPut(pMeta->pTableObjHash, &(pTableObj->pTable->uid), sizeof(tb_uid_t), &pTableObj, sizeof(pTableObj)); wopt = rocksdb_writeoptions_create(); + rocksdb_writeoptions_disable_WAL(wopt, 1); // Add to tbname db rocksdb_put(pMeta->tbnameDb, wopt, pTableOpts->name, strlen(pTableOpts->name), &pTableObj->pTable->uid, sizeof(tb_uid_t), &err); // Add to schema db - char id[12]; - char buf[256]; + char id[12]; + char buf[256]; void *pBuf = buf; *(tb_uid_t *)id = pTableObj->pTable->uid; *(int32_t *)(id + sizeof(tb_uid_t)) = schemaVersion(pTableOpts->pSchema); int size = tdEncodeSchema(&pBuf, pTableOpts->pSchema); - + rocksdb_put(pMeta->schemaDb, wopt, id, 12, buf, size, &err); rocksdb_writeoptions_destroy(wopt); diff --git a/source/server/vnode/meta/test/metaTests.cpp b/source/server/vnode/meta/test/metaTests.cpp index f81302fc911de4e6ffc53161af2a229fbc1361cc..47ca49b70a35028973790c8c2d14e1b30972a6fd 100644 --- a/source/server/vnode/meta/test/metaTests.cpp +++ b/source/server/vnode/meta/test/metaTests.cpp @@ -31,7 +31,7 @@ TEST(MetaTest, meta_open_test) { metaClose(meta); std::cout << "Meta is closed!" << std::endl; - // // Destroy Meta - // metaDestroy("meta"); - // std::cout << "Meta is destroyed!" << std::endl; + // Destroy Meta + metaDestroy("meta"); + std::cout << "Meta is destroyed!" << std::endl; } \ No newline at end of file