提交 cdcb3364 编写于 作者: S Shengliang Guan

Merge remote-tracking branch 'origin/main' into fix/TD-21644

...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# taosadapter # taosadapter
ExternalProject_Add(taosadapter ExternalProject_Add(taosadapter
GIT_REPOSITORY https://github.com/taosdata/taosadapter.git GIT_REPOSITORY https://github.com/taosdata/taosadapter.git
GIT_TAG a2e9920 GIT_TAG 69eee2e
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosadapter" SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosadapter"
BINARY_DIR "" BINARY_DIR ""
#BUILD_IN_SOURCE TRUE #BUILD_IN_SOURCE TRUE
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "dmMgmt.h" #include "dmMgmt.h"
static SDnode global = {0}; static SDnode globalDnode = {0};
SDnode *dmInstance() { return &global; } SDnode *dmInstance() { return &globalDnode; }
static int32_t dmCheckRepeatInit(SDnode *pDnode) { static int32_t dmCheckRepeatInit(SDnode *pDnode) {
if (atomic_val_compare_exchange_8(&pDnode->once, DND_ENV_INIT, DND_ENV_READY) != DND_ENV_INIT) { if (atomic_val_compare_exchange_8(&pDnode->once, DND_ENV_INIT, DND_ENV_READY) != DND_ENV_INIT) {
...@@ -270,6 +270,6 @@ void dmReportStartup(const char *pName, const char *pDesc) { ...@@ -270,6 +270,6 @@ void dmReportStartup(const char *pName, const char *pDesc) {
} }
int64_t dmGetClusterId() { int64_t dmGetClusterId() {
return global.data.clusterId; return globalDnode.data.clusterId;
} }
...@@ -329,8 +329,7 @@ static int vnodeCommitImpl(SCommitInfo *pInfo) { ...@@ -329,8 +329,7 @@ static int vnodeCommitImpl(SCommitInfo *pInfo) {
snprintf(dir, TSDB_FILENAME_LEN, "%s", pVnode->path); snprintf(dir, TSDB_FILENAME_LEN, "%s", pVnode->path);
} }
// walBeginSnapshot(pVnode->pWal, pVnode->state.applied); syncBeginSnapshot(pVnode->sync, pInfo->info.state.committed);
syncBeginSnapshot(pVnode->sync, pVnode->state.applied);
// commit each sub-system // commit each sub-system
code = tsdbCommit(pVnode->pTsdb, pInfo); code = tsdbCommit(pVnode->pTsdb, pInfo);
...@@ -372,7 +371,6 @@ static int vnodeCommitImpl(SCommitInfo *pInfo) { ...@@ -372,7 +371,6 @@ static int vnodeCommitImpl(SCommitInfo *pInfo) {
return -1; return -1;
} }
// walEndSnapshot(pVnode->pWal);
syncEndSnapshot(pVnode->sync); syncEndSnapshot(pVnode->sync);
_exit: _exit:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册