提交 82a72bf2 编写于 作者: S slguan

fix compile errors

上级 cb7322de
...@@ -395,7 +395,7 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) { ...@@ -395,7 +395,7 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
char* pMsg = pCmd->payload + tsRpcHeadSize; char* pMsg = pCmd->payload + tsRpcHeadSize;
pMsg += sizeof(SMgmtHead); pMsg += sizeof(SMgmtHead);
SCfgDnodeMsg* pCfg = (SCfgDnodeMsg*)pMsg; SCMCfgDnodeMsg* pCfg = (SCMCfgDnodeMsg*)pMsg;
strncpy(pCfg->ip, pDCL->a[0].z, pDCL->a[0].n); strncpy(pCfg->ip, pDCL->a[0].z, pDCL->a[0].n);
strncpy(pCfg->config, pDCL->a[1].z, pDCL->a[1].n); strncpy(pCfg->config, pDCL->a[1].z, pDCL->a[1].n);
......
...@@ -1795,7 +1795,7 @@ int32_t tscBuildUserMsg(SSqlObj *pSql, SSqlInfo *pInfo) { ...@@ -1795,7 +1795,7 @@ int32_t tscBuildUserMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
int32_t tscBuildCfgDnodeMsg(SSqlObj *pSql, SSqlInfo *pInfo) { int32_t tscBuildCfgDnodeMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
SSqlCmd *pCmd = &pSql->cmd; SSqlCmd *pCmd = &pSql->cmd;
pCmd->payloadLen = sizeof(SCfgDnodeMsg); pCmd->payloadLen = sizeof(SCMCfgDnodeMsg);
if (TSDB_CODE_SUCCESS != tscAllocPayload(pCmd, pCmd->payloadLen)) { if (TSDB_CODE_SUCCESS != tscAllocPayload(pCmd, pCmd->payloadLen)) {
tscError("%p failed to malloc for query msg", pSql); tscError("%p failed to malloc for query msg", pSql);
......
...@@ -7,7 +7,7 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM)) ...@@ -7,7 +7,7 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/util/inc) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/util/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/query/inc) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/query/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/vnode/tsdb/inc) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/vnode/tsdb/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/vnode/common/inc) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/common/inc)
INCLUDE_DIRECTORIES(${TD_ENTERPRISE_DIR}/src/inc) INCLUDE_DIRECTORIES(${TD_ENTERPRISE_DIR}/src/inc)
INCLUDE_DIRECTORIES(inc) INCLUDE_DIRECTORIES(inc)
AUX_SOURCE_DIRECTORY(src SRC) AUX_SOURCE_DIRECTORY(src SRC)
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "tlog.h" #include "tlog.h"
#include "trpc.h" #include "trpc.h"
#include "tstatus.h" #include "tstatus.h"
//#include "tsdb.h" #include "tsdb.h"
#include "dnodeMgmt.h" #include "dnodeMgmt.h"
#include "dnodeRead.h" #include "dnodeRead.h"
#include "dnodeWrite.h" #include "dnodeWrite.h"
...@@ -139,111 +139,111 @@ static void dnodeCleanupVnodes() { ...@@ -139,111 +139,111 @@ static void dnodeCleanupVnodes() {
} }
static int32_t dnodeOpenVnode(int32_t vgId) { static int32_t dnodeOpenVnode(int32_t vgId) {
// char rootDir[TSDB_FILENAME_LEN] = {0}; char rootDir[TSDB_FILENAME_LEN] = {0};
// sprintf(rootDir, "%s/vnode%d", tsDirectory, vgId); sprintf(rootDir, "%s/vnode%d", tsDirectory, vgId);
//
// void *pTsdb = tsdbOpenRepo(rootDir); void *pTsdb = tsdbOpenRepo(rootDir);
// if (pTsdb != NULL) { if (pTsdb != NULL) {
// return terrno; return terrno;
// } }
//
// SVnodeObj vnodeObj; SVnodeObj vnodeObj;
// vnodeObj.vgId = vgId; vnodeObj.vgId = vgId;
// vnodeObj.status = TSDB_VN_STATUS_NOT_READY; vnodeObj.status = TSDB_VN_STATUS_NOT_READY;
// vnodeObj.refCount = 1; vnodeObj.refCount = 1;
// vnodeObj.version = 0; vnodeObj.version = 0;
// vnodeObj.wworker = dnodeAllocateWriteWorker(); vnodeObj.wworker = dnodeAllocateWriteWorker();
// vnodeObj.rworker = dnodeAllocateReadWorker(); vnodeObj.rworker = dnodeAllocateReadWorker();
// vnodeObj.wal = NULL; vnodeObj.wal = NULL;
// vnodeObj.tsdb = pTsdb; vnodeObj.tsdb = pTsdb;
// vnodeObj.replica = NULL; vnodeObj.replica = NULL;
// vnodeObj.events = NULL; vnodeObj.events = NULL;
// vnodeObj.cq = NULL; vnodeObj.cq = NULL;
//
// taosAddIntHash(tsDnodeVnodesHash, vnodeObj.vgId, &vnodeObj); taosAddIntHash(tsDnodeVnodesHash, vnodeObj.vgId, &vnodeObj);
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
static void dnodeCleanupVnode(SVnodeObj *pVnode) { static void dnodeCleanupVnode(SVnodeObj *pVnode) {
// pVnode->status = TSDB_VN_STATUS_NOT_READY; pVnode->status = TSDB_VN_STATUS_NOT_READY;
// int32_t count = atomic_sub_fetch_32(&pVnode->refCount, 1); int32_t count = atomic_sub_fetch_32(&pVnode->refCount, 1);
// if (count > 0) { if (count > 0) {
// // wait refcount // wait refcount
// } }
//
// // remove replica // remove replica
//
// // remove read queue // remove read queue
// dnodeFreeReadWorker(pVnode->rworker); dnodeFreeReadWorker(pVnode->rworker);
// pVnode->rworker = NULL; pVnode->rworker = NULL;
//
// // remove write queue // remove write queue
// dnodeFreeWriteWorker(pVnode->wworker); dnodeFreeWriteWorker(pVnode->wworker);
// pVnode->wworker = NULL; pVnode->wworker = NULL;
//
// // remove wal // remove wal
//
// // remove tsdb // remove tsdb
// if (pVnode->tsdb) { if (pVnode->tsdb) {
// tsdbCloseRepo(pVnode->tsdb); tsdbCloseRepo(pVnode->tsdb);
// pVnode->tsdb = NULL; pVnode->tsdb = NULL;
// } }
//
// taosDeleteIntHash(tsDnodeVnodesHash, pVnode->vgId); taosDeleteIntHash(tsDnodeVnodesHash, pVnode->vgId);
} }
static int32_t dnodeCreateVnode(SMDCreateVnodeMsg *pVnodeCfg) { static int32_t dnodeCreateVnode(SMDCreateVnodeMsg *pVnodeCfg) {
// STsdbCfg tsdbCfg; STsdbCfg tsdbCfg;
// tsdbCfg.precision = pVnodeCfg->cfg.precision; tsdbCfg.precision = pVnodeCfg->cfg.precision;
// tsdbCfg.tsdbId = pVnodeCfg->vnode; tsdbCfg.tsdbId = pVnodeCfg->vnode;
// tsdbCfg.maxTables = pVnodeCfg->cfg.maxSessions; tsdbCfg.maxTables = pVnodeCfg->cfg.maxSessions;
// tsdbCfg.daysPerFile = pVnodeCfg->cfg.daysPerFile; tsdbCfg.daysPerFile = pVnodeCfg->cfg.daysPerFile;
// tsdbCfg.minRowsPerFileBlock = -1; tsdbCfg.minRowsPerFileBlock = -1;
// tsdbCfg.maxRowsPerFileBlock = -1; tsdbCfg.maxRowsPerFileBlock = -1;
// tsdbCfg.keep = -1; tsdbCfg.keep = -1;
// tsdbCfg.maxCacheSize = -1; tsdbCfg.maxCacheSize = -1;
// char rootDir[TSDB_FILENAME_LEN] = {0}; char rootDir[TSDB_FILENAME_LEN] = {0};
// sprintf(rootDir, "%s/vnode%d", tsDirectory, pVnodeCfg->cfg.vgId); sprintf(rootDir, "%s/vnode%d", tsDirectory, pVnodeCfg->cfg.vgId);
//
// void *pTsdb = tsdbCreateRepo(rootDir, &tsdbCfg, NULL); void *pTsdb = tsdbCreateRepo(rootDir, &tsdbCfg, NULL);
// if (pTsdb != NULL) { if (pTsdb != NULL) {
// return terrno; return terrno;
// } }
//
// SVnodeObj vnodeObj; SVnodeObj vnodeObj;
// vnodeObj.vgId = pVnodeCfg->cfg.vgId; vnodeObj.vgId = pVnodeCfg->cfg.vgId;
// vnodeObj.status = TSDB_VN_STATUS_NOT_READY; vnodeObj.status = TSDB_VN_STATUS_NOT_READY;
// vnodeObj.refCount = 1; vnodeObj.refCount = 1;
// vnodeObj.version = 0; vnodeObj.version = 0;
// vnodeObj.wworker = dnodeAllocateWriteWorker(); vnodeObj.wworker = dnodeAllocateWriteWorker();
// vnodeObj.rworker = dnodeAllocateReadWorker(); vnodeObj.rworker = dnodeAllocateReadWorker();
// vnodeObj.wal = NULL; vnodeObj.wal = NULL;
// vnodeObj.tsdb = pTsdb; vnodeObj.tsdb = pTsdb;
// vnodeObj.replica = NULL; vnodeObj.replica = NULL;
// vnodeObj.events = NULL; vnodeObj.events = NULL;
// vnodeObj.cq = NULL; vnodeObj.cq = NULL;
//
// taosAddIntHash(tsDnodeVnodesHash, vnodeObj.vgId, &vnodeObj); taosAddIntHash(tsDnodeVnodesHash, vnodeObj.vgId, &vnodeObj);
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
static void dnodeDropVnode(SVnodeObj *pVnode) { static void dnodeDropVnode(SVnodeObj *pVnode) {
// pVnode->status = TSDB_VN_STATUS_NOT_READY; pVnode->status = TSDB_VN_STATUS_NOT_READY;
//
// int32_t count = atomic_sub_fetch_32(&pVnode->refCount, 1); int32_t count = atomic_sub_fetch_32(&pVnode->refCount, 1);
// if (count > 0) { if (count > 0) {
// // wait refcount // wait refcount
// } }
//
// if (pVnode->tsdb) { if (pVnode->tsdb) {
// tsdbDropRepo(pVnode->tsdb); tsdbDropRepo(pVnode->tsdb);
// pVnode->tsdb = NULL; pVnode->tsdb = NULL;
// } }
//
// dnodeCleanupVnode(pVnode); dnodeCleanupVnode(pVnode);
} }
static void dnodeProcesSMDCreateVnodeMsg(SRpcMsg *rpcMsg) { static void dnodeProcesSMDCreateVnodeMsg(SRpcMsg *rpcMsg) {
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "os.h"
#include "mgmtMnode.h" #include "mgmtMnode.h"
bool mgmtCheckRedirect(void *handle) { bool mgmtCheckRedirect(void *handle) {
......
...@@ -96,7 +96,7 @@ void mgmtCleanUpShell() { ...@@ -96,7 +96,7 @@ void mgmtCleanUpShell() {
} }
} }
void mgmtAddShellHandle(uint8_t showType, void (*fp)(SRpcMsg *rpcMsg)) { void mgmtAddShellMsgHandle(uint8_t showType, void (*fp)(SRpcMsg *rpcMsg)) {
tsMgmtProcessShellMsgFp[showType] = fp; tsMgmtProcessShellMsgFp[showType] = fp;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册