refactor: do some internal refactor.
This commit is contained in:
parent
611ab8b394
commit
e0e55b2d65
|
@ -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])
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#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
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "tdatablock.h"
|
||||
#include "tmisce.h"
|
||||
#include "tglobal.h"
|
||||
#include "tlog.h"
|
||||
#include "tname.h"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue