diff --git a/include/common/tdatablock.h b/include/common/tdatablock.h index 502ba10d337d80107b94cb01b182a63d14a63cc9..76ab2f7c3f5e966b39afb8cf30568dc788f515a7 100644 --- a/include/common/tdatablock.h +++ b/include/common/tdatablock.h @@ -24,11 +24,6 @@ extern "C" { #endif -typedef struct SCorEpSet { - int32_t version; - SEpSet epSet; -} SCorEpSet; - typedef struct SBlockOrderInfo { bool nullFirst; int32_t order; @@ -36,14 +31,6 @@ typedef struct SBlockOrderInfo { SColumnInfoData* pColData; } SBlockOrderInfo; -int32_t taosGetFqdnPortFromEp(const char* ep, SEp* pEp); -void addEpIntoEpSet(SEpSet* pEpSet, const char* fqdn, uint16_t port); - -bool isEpsetEqual(const SEpSet* s1, const SEpSet* s2); - -void updateEpSet_s(SCorEpSet* pEpSet, SEpSet* pNewEpSet); -SEpSet getEpSet_s(SCorEpSet* pEpSet); - #define NBIT (3u) #define BitPos(_n) ((_n) & ((1 << NBIT) - 1)) #define BMCharPos(bm_, r_) ((bm_)[(r_) >> NBIT]) diff --git a/include/common/tmisce.h b/include/common/tmisce.h new file mode 100644 index 0000000000000000000000000000000000000000..b9f5cf5b91f55a8f9ca14194b41673c8506bb3fa --- /dev/null +++ b/include/common/tmisce.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#ifndef TDENGINE_TMISCE_H +#define TDENGINE_TMISCE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "tmsg.h" + +typedef struct SCorEpSet { + int32_t version; + SEpSet epSet; +} SCorEpSet; + +int32_t taosGetFqdnPortFromEp(const char* ep, SEp* pEp); +void addEpIntoEpSet(SEpSet* pEpSet, const char* fqdn, uint16_t port); + +bool isEpsetEqual(const SEpSet* s1, const SEpSet* s2); + +void updateEpSet_s(SCorEpSet* pEpSet, SEpSet* pNewEpSet); +SEpSet getEpSet_s(SCorEpSet* pEpSet); + +#ifdef __cplusplus +} +#endif + +#endif // TDENGINE_TMISCE_H diff --git a/source/client/inc/clientInt.h b/source/client/inc/clientInt.h index e569a977239c5feca935b99fe200096053755849..aae20c587d2b2d6373126ba6fcbbce8eb2daed14 100644 --- a/source/client/inc/clientInt.h +++ b/source/client/inc/clientInt.h @@ -26,7 +26,7 @@ extern "C" { #include "query.h" #include "taos.h" #include "tcommon.h" -#include "tdatablock.h" +#include "tmisce.h" #include "tdef.h" #include "thash.h" #include "tlist.h" diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index efa7d095c519d3e56ff3f7766a89995987e95f27..a84f9e6bb0918be130caa7ce55beeca5abdf3e3b 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -20,13 +20,13 @@ #include "functionMgt.h" #include "os.h" #include "query.h" -#include "qworker.h" #include "scheduler.h" #include "tglobal.h" #include "tmsg.h" #include "tref.h" #include "trpc.h" #include "version.h" +#include "tdatablock.h" #define TSC_VAR_NOT_RELEASE 1 #define TSC_VAR_RELEASED 0 diff --git a/source/client/src/clientMsgHandler.c b/source/client/src/clientMsgHandler.c index 591d469d7c28308c0e41ca204a4548dd498a9b1f..a49d072569b6c78a6bb5c76fa0f5913ca5314366 100644 --- a/source/client/src/clientMsgHandler.c +++ b/source/client/src/clientMsgHandler.c @@ -20,6 +20,7 @@ #include "query.h" #include "tdef.h" #include "tname.h" +#include "tdatablock.h" static void setErrno(SRequestObj* pRequest, int32_t code) { pRequest->code = code; diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 0db3e9986323d9be493ac95730b9777d13e2ec8c..d82ad5c15aac30f464c59c1a1ec5349e7d6e7c7e 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -16,7 +16,7 @@ #define _DEFAULT_SOURCE #include "tglobal.h" #include "tconfig.h" -#include "tdatablock.h" +#include "tmisce.h" #include "tgrant.h" #include "tlog.h" diff --git a/source/common/src/tmisce.c b/source/common/src/tmisce.c index dfaebc99f682301ce788a343e50331b9a6be93a7..dfb1917fcfbeddf5814a6689bba8864be44c180e 100644 --- a/source/common/src/tmisce.c +++ b/source/common/src/tmisce.c @@ -14,7 +14,7 @@ */ #define _DEFAULT_SOURCE -#include "tdatablock.h" +#include "tmisce.h" #include "tglobal.h" #include "tlog.h" #include "tname.h" diff --git a/source/dnode/mgmt/node_util/src/dmEps.c b/source/dnode/mgmt/node_util/src/dmEps.c index 7fe7d448270385c01bf0612942f608b0a662a948..4bc2e64fad85f2e13eca41d9024f1e9411d63f3f 100644 --- a/source/dnode/mgmt/node_util/src/dmEps.c +++ b/source/dnode/mgmt/node_util/src/dmEps.c @@ -15,6 +15,7 @@ #define _DEFAULT_SOURCE #include "dmUtil.h" +#include "tmisce.h" static void dmPrintEps(SDnodeData *pData); static bool dmIsEpChanged(SDnodeData *pData, int32_t dnodeId, const char *ep); diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 521f924fad89eb3a169044e6dce27b41a5487770..2a3ecf1924654ebbc5c589f65a0d291e9754b0fa 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -24,6 +24,7 @@ #include "mndTrans.h" #include "mndUser.h" #include "mndVgroup.h" +#include "tmisce.h" #define TSDB_DNODE_VER_NUMBER 1 #define TSDB_DNODE_RESERVE_SIZE 64 diff --git a/source/dnode/mnode/impl/src/mndMnode.c b/source/dnode/mnode/impl/src/mndMnode.c index 563b3cd3cf6859440a5f12f9826729a4a89102f8..b02ca4c773643063e2549d5178292c87e21ebb77 100644 --- a/source/dnode/mnode/impl/src/mndMnode.c +++ b/source/dnode/mnode/impl/src/mndMnode.c @@ -20,7 +20,7 @@ #include "mndShow.h" #include "mndSync.h" #include "mndTrans.h" -#include "mndUser.h" +#include "tmisce.h" #define MNODE_VER_NUMBER 1 #define MNODE_RESERVE_SIZE 64 diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c index e00d0d955ec820176cb696fa652c5e7fdd374edb..5555335765063e1b6afd3eb3668a7de6fdfb48e7 100644 --- a/source/dnode/mnode/impl/src/mndVgroup.c +++ b/source/dnode/mnode/impl/src/mndVgroup.c @@ -22,6 +22,7 @@ #include "mndShow.h" #include "mndTrans.h" #include "mndUser.h" +#include "tmisce.h" #define VGROUP_VER_NUMBER 1 #define VGROUP_RESERVE_SIZE 64