提交 0e8c2260 编写于 作者: S Shengliang Guan

the starting version of wal is 0

上级 ab936621
aux_source_directory(. ACCT_SRC) aux_source_directory(. ACCT_SRC)
add_executable(dnode_test_acct ${ACCT_SRC}) add_executable(mnode_test_acct ${ACCT_SRC})
target_link_libraries( target_link_libraries(
dnode_test_acct mnode_test_acct
PUBLIC sut PUBLIC sut
) )
add_test( add_test(
NAME dnode_test_acct NAME mnode_test_acct
COMMAND dnode_test_acct COMMAND mnode_test_acct
) )
/** /**
* @file acct.cpp * @file acct.cpp
* @author slguan (slguan@taosdata.com) * @author slguan (slguan@taosdata.com)
* @brief DNODE module acct-msg tests * @brief MNODE module acct-msg tests
* @version 0.1 * @version 0.1
* @date 2021-12-15 * @date 2021-12-15
* *
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
class DndTestAcct : public ::testing::Test { class DndTestAcct : public ::testing::Test {
protected: protected:
static void SetUpTestSuite() { test.Init("/tmp/dnode_test_acct", 9012); } static void SetUpTestSuite() { test.Init("/tmp/mnode_test_acct", 9012); }
static void TearDownTestSuite() { test.Cleanup(); } static void TearDownTestSuite() { test.Cleanup(); }
static Testbase test; static Testbase test;
......
aux_source_directory(. USER_SRC) aux_source_directory(. USER_SRC)
add_executable(dnode_test_user ${USER_SRC}) add_executable(mnode_test_user ${USER_SRC})
target_link_libraries( target_link_libraries(
dnode_test_user mnode_test_user
PUBLIC sut PUBLIC sut
) )
add_test( add_test(
NAME dnode_test_user NAME mnode_test_user
COMMAND dnode_test_user COMMAND mnode_test_user
) )
/** /**
* @file user.cpp * @file user.cpp
* @author slguan (slguan@taosdata.com) * @author slguan (slguan@taosdata.com)
* @brief DNODE module user-msg tests * @brief MNODE module user-msg tests
* @version 0.1 * @version 0.1
* @date 2021-12-15 * @date 2021-12-15
* *
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
class DndTestUser : public ::testing::Test { class DndTestUser : public ::testing::Test {
protected: protected:
static void SetUpTestSuite() { test.Init("/tmp/dnode_test_user", 9140); } static void SetUpTestSuite() { test.Init("/tmp/mnode_test_user", 9140); }
static void TearDownTestSuite() { test.Cleanup(); } static void TearDownTestSuite() { test.Cleanup(); }
static Testbase test; static Testbase test;
......
...@@ -51,6 +51,8 @@ SSdb *sdbInit(SSdbOpt *pOption) { ...@@ -51,6 +51,8 @@ SSdb *sdbInit(SSdbOpt *pOption) {
taosInitRWLatch(&pSdb->locks[i]); taosInitRWLatch(&pSdb->locks[i]);
} }
pSdb->curVer = -1;
pSdb->lastCommitVer = -1;
pSdb->pMnode = pOption->pMnode; pSdb->pMnode = pOption->pMnode;
mDebug("sdb init successfully"); mDebug("sdb init successfully");
return pSdb; return pSdb;
...@@ -162,5 +164,5 @@ static int32_t sdbCreateDir(SSdb *pSdb) { ...@@ -162,5 +164,5 @@ static int32_t sdbCreateDir(SSdb *pSdb) {
int64_t sdbUpdateVer(SSdb *pSdb, int32_t val) { int64_t sdbUpdateVer(SSdb *pSdb, int32_t val) {
pSdb->curVer += val; pSdb->curVer += val;
return val; return pSdb->curVer;
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册