diff --git a/include/server/vnode/meta/meta.h b/include/server/vnode/meta/meta.h index 4167dedde6e57f0d090117735fb0d1109597f53a..bfa11b9c39e6de2201878f59eb6b97df8c32cbba 100644 --- a/include/server/vnode/meta/meta.h +++ b/include/server/vnode/meta/meta.h @@ -34,7 +34,7 @@ typedef struct SMetaQueryOptions SMetaQueryOptions; // SMeta operations int metaCreate(const char *path); -int metaDestroy(const char *path); +void metaDestroy(const char *path); SMeta *metaOpen(SMetaOptions *); void metaClose(SMeta *); int metaCreateTable(SMeta *, void *); diff --git a/source/os/src/osDir.c b/source/os/src/osDir.c index 0526dffe9e799616a0d1b091e2765b02807e64cd..839db811fd2f1e72b86fc34a2c8b1934e67f1b94 100644 --- a/source/os/src/osDir.c +++ b/source/os/src/osDir.c @@ -48,7 +48,7 @@ void taosRemoveDir(char *dirname) { taosRemoveDir(filename); } else { (void)remove(filename); - printf("file:%s is removed", filename); + printf("file:%s is removed\n", filename); } } diff --git a/source/server/vnode/meta/src/meta.c b/source/server/vnode/meta/src/meta.c index ff8186d1d7327cee908a3ece953779f46f7099d8..e945e6eac42224566029c8777687597aa2f6ecfe 100644 --- a/source/server/vnode/meta/src/meta.c +++ b/source/server/vnode/meta/src/meta.c @@ -104,4 +104,6 @@ void metaClose(SMeta *pMeta) { } } +void metaDestroy(const char *path) { taosRemoveDir(path); } + int metaCommit(SMeta *meta) { return 0; } \ No newline at end of file diff --git a/source/server/vnode/meta/test/metaTests.cpp b/source/server/vnode/meta/test/metaTests.cpp index caf77f720ae3f45a40e036c35f141702a2631054..fcc1220273b76cb1a9f19f9e6a9470a72c0a0baa 100644 --- a/source/server/vnode/meta/test/metaTests.cpp +++ b/source/server/vnode/meta/test/metaTests.cpp @@ -9,4 +9,7 @@ TEST(MetaTest, meta_open_test) { metaClose(meta); std::cout << "Meta is closed!" << std::endl; + + metaDestroy("meta"); + std::cout << "Meta is destroyed!" << std::endl; } \ No newline at end of file