From 98ae04e7e62872b258a72f46167e90c555834f03 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 12 Oct 2021 11:41:27 +0800 Subject: [PATCH] more --- include/server/vnode/meta/meta.h | 2 +- source/os/src/osDir.c | 2 +- source/server/vnode/meta/src/meta.c | 2 ++ source/server/vnode/meta/test/metaTests.cpp | 3 +++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/server/vnode/meta/meta.h b/include/server/vnode/meta/meta.h index 4167dedde6..bfa11b9c39 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 0526dffe9e..839db811fd 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 ff8186d1d7..e945e6eac4 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 caf77f720a..fcc1220273 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 -- GitLab